PenUltima Online

It is currently Sat Sep 06, 2008 1:34 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: SendEvent(mob, Struct { "type" := EVID_ALL_ATTACK_
PostPosted: Sun Aug 05, 2007 9:54 am 
Offline

Joined: Fri Feb 10, 2006 10:06 am
Posts: 79
Location: Italy
Can't use:

SendEvent(mob, Struct { "type" := EVID_ALL_ATTACK_CMD, "source" := me, "target" := tgt } );

_________________
Zandor


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 05, 2007 1:21 pm 
Offline

Joined: Sat Feb 04, 2006 5:49 pm
Posts: 748
Location: Chicago, IL USA
Try looking at what error it gives you.

Also maybe try

mob.process.sendevent( Struct { "type" := EVID_ALL_ATTACK_CMD, "source" := me, "target" := tgt } );


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 05, 2007 1:38 pm 
Offline

Joined: Fri Feb 10, 2006 10:06 am
Posts: 79
Location: Italy
No.... It is a problem in parameter passage
If I write:

var str := Struct { "type" := EVID_ALL_ATTACK_CMD, "source" := me, "target" := tgt };
SendEvent(mob, str);

it is ok but I don't' want waste memory space with variable used once time only....

SendEvent(mob, Struct { "type" := EVID_ALL_ATTACK_CMD, "source" := me, "target" := tgt } );

_________________
Zandor


Top
 Profile  
 
 Post subject: define and declare struct inside function call
PostPosted: Fri Aug 24, 2007 4:01 am 
Offline

Joined: Fri Feb 10, 2006 10:06 am
Posts: 79
Location: Italy
Ehm... some news from staff?
It is normal I cant use sintax like this?

Code:
call_funcion(par1, Struct { "member1" := value1, "member2" := value2 });

_________________
Zandor


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 4:05 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 217
Have you tried declaring struct without quotes?

Code:
SendEvent(mob, Struct{ type := EVID_ALL_ATTACK_CMD, source := me, target := tgt } );


Top
 Profile  
 
 Post subject:
PostPosted: Fri Aug 24, 2007 7:00 am 
Offline

Joined: Fri Feb 10, 2006 10:06 am
Posts: 79
Location: Italy
If I use

Code:
var str := Struct { "member1" := value1, "member2" := value2 };
call_funcion(par1, str);


instead of

Code:
call_funcion(par1, Struct { "member1" := value1, "member2" := value2 });


it'ok....

Anymore I have tryed use syntax

Code:
Struct { member1 := value1, member2 := value2 });


instead of

Code:
Struct { "member1" := value1, "member2" := value2 });


years ago with pol096 but was no correct.
Whithout quote is not correct also the syntax:

Code:
var str := Struct { member1 := value1, member2 := value2 };
call_funcion(par1, str);

_________________
Zandor


Top
 Profile  
 
 Post subject:
PostPosted: Mon Oct 15, 2007 9:04 am 
Offline

Joined: Fri Feb 10, 2006 10:06 am
Posts: 79
Location: Italy
Bug problem in parameter with struct?
I have known bad so problem do not exist or staff think ti solve it?

_________________
Zandor


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl