PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
SendEvent(mob, Struct { "type" := EVID_ALL_ATTACK_

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 097
Display posts from previous:   

Author Message
zandor70



Joined: 10 Feb 2006
Posts: 79
Location: Italy

PostPosted: Sun Aug 05, 2007 1:54 pm    Post subject: SendEvent(mob, Struct { "type" := EVID_ALL_ATTACK_ Reply with quote

Can't use:

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

Author Message
CWO



Joined: 04 Feb 2006
Posts: 677
Location: Chicago, IL USA

PostPosted: Sun Aug 05, 2007 5:21 pm    Post subject: Reply with quote

Try looking at what error it gives you.

Also maybe try

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

Author Message
zandor70



Joined: 10 Feb 2006
Posts: 79
Location: Italy

PostPosted: Sun Aug 05, 2007 5:38 pm    Post subject: Reply with quote

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 } );

Author Message
zandor70



Joined: 10 Feb 2006
Posts: 79
Location: Italy

PostPosted: Fri Aug 24, 2007 8:01 am    Post subject: define and declare struct inside function call Reply with quote

Ehm... some news from staff?
It is normal I cant use sintax like this?

Code:

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

Author Message
ncrsn



Joined: 10 Feb 2006
Posts: 107

PostPosted: Fri Aug 24, 2007 8:05 am    Post subject: Reply with quote

Have you tried declaring struct without quotes?

Code:

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

Author Message
zandor70



Joined: 10 Feb 2006
Posts: 79
Location: Italy

PostPosted: Fri Aug 24, 2007 11:00 am    Post subject: Reply with quote

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);

Author Message
zandor70



Joined: 10 Feb 2006
Posts: 79
Location: Italy

PostPosted: Mon Oct 15, 2007 1:04 pm    Post subject: Reply with quote

Bug problem in parameter with struct?
I have known bad so problem do not exist or staff think ti solve it?

Post new topic   Reply to topic    PenUltima Online Forum Index -> Bug Reports 097 All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty