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
struct definition error

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

Author Message
innominabile



Joined: 30 Aug 2006
Posts: 81
Location: Italy

PostPosted: Wed Apr 02, 2008 6:28 pm    Post subject: struct definition error Reply with quote

var start := Struct { "hp" := CInt(GetVital(caster, VITALID_LIFE) / 100),
"x" := Cint(caster.x), "y" := Cint(caster.y), "z" := Cint(caster.z), "realm" := Cstr(caster.realm) };

is ok but

var start := Struct { "hp" := CInt(GetVital(caster, VITALID_LIFE) / 100),
"x" := caster.x, "y" := caster.y, "z" := caster.z, "realm" := caster.realm };

is not ok.
It build struct
start struct { realm := struct { x := .....

Author Message
ncrsn



Joined: 10 Feb 2006
Posts: 165

PostPosted: Thu Apr 03, 2008 11:13 am    Post subject: Reply with quote

That's odd.

I put the latter inside a print()-function and it worked just fine. Using POL 097 2008-02-26 if that makes a difference.

Code:

var start := Struct { "hp" := CInt(GetVital(caster, VITALID_LIFE) / 100),
"x" := caster.x, "y" := caster.y, "z" := caster.z, "realm" := caster.realm };
print(start);

Author Message
innominabile



Joined: 30 Aug 2006
Posts: 81
Location: Italy

PostPosted: Thu Apr 03, 2008 1:39 pm    Post subject: Reply with quote

I used a print to verify the problem... and print show start is defined like a struct that contains another struct inside: realm with contains inside it remaining struct values lile "x" "y" "z".... and using last pol097-2008-02-26....

I have a long history in error ins truct declaration.

But staff to not trust me.

It seem only I have problems on struct...

For exampe I have found it is very different also in function parameters use:

var pars := Struct { ........... };
call_function (who, pars);

and the other syntax:

call_function (who, Struct { ........... } );

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