SendEvent(mob, Struct { "type" := EVID_ALL_ATTACK_

Report core bugs regarding the Ultima Online Emulator Core release (version 097). You can attach your Core Dump. One bug per post.

Moderator: POL Developer

Locked
User avatar
zandor70
Master Poster
Posts: 93
Joined: Fri Feb 10, 2006 10:06 am
Location: Italy

SendEvent(mob, Struct { "type" := EVID_ALL_ATTACK_

Post by zandor70 »

Can't use:

SendEvent(mob, Struct { "type" := EVID_ALL_ATTACK_CMD, "source" := me, "target" := tgt } );
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Post by CWO »

Try looking at what error it gives you.

Also maybe try

mob.process.sendevent( Struct { "type" := EVID_ALL_ATTACK_CMD, "source" := me, "target" := tgt } );
User avatar
zandor70
Master Poster
Posts: 93
Joined: Fri Feb 10, 2006 10:06 am
Location: Italy

Post by zandor70 »

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 } );
User avatar
zandor70
Master Poster
Posts: 93
Joined: Fri Feb 10, 2006 10:06 am
Location: Italy

define and declare struct inside function call

Post by zandor70 »

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

Code: Select all

call_funcion(par1, Struct { "member1" := value1, "member2" := value2 });
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post by ncrsn »

Have you tried declaring struct without quotes?

Code: Select all

SendEvent(mob, Struct{ type := EVID_ALL_ATTACK_CMD, source := me, target := tgt } );
User avatar
zandor70
Master Poster
Posts: 93
Joined: Fri Feb 10, 2006 10:06 am
Location: Italy

Post by zandor70 »

If I use

Code: Select all

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

Code: Select all

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

Anymore I have tryed use syntax

Code: Select all

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

Code: Select all

Struct { "member1" := value1, "member2" := value2 });
years ago with pol096 but was no correct.
Whithout quote is not correct also the syntax:

Code: Select all

var str := Struct { member1 := value1, member2 := value2 };
call_funcion(par1, str);
User avatar
zandor70
Master Poster
Posts: 93
Joined: Fri Feb 10, 2006 10:06 am
Location: Italy

Post by zandor70 »

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