Page 1 of 1

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

Posted: Sun Aug 05, 2007 9:54 am
by zandor70
Can't use:

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

Posted: Sun Aug 05, 2007 1:21 pm
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 } );

Posted: Sun Aug 05, 2007 1:38 pm
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 } );

define and declare struct inside function call

Posted: Fri Aug 24, 2007 4:01 am
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 });

Posted: Fri Aug 24, 2007 4:05 am
by ncrsn
Have you tried declaring struct without quotes?

Code: Select all

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

Posted: Fri Aug 24, 2007 7:00 am
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);

Posted: Mon Oct 15, 2007 9:04 am
by zandor70
Bug problem in parameter with struct?
I have known bad so problem do not exist or staff think ti solve it?