struct definition error

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
innominabile
Adept Poster
Posts: 85
Joined: Wed Aug 30, 2006 5:24 pm
Location: Italy

struct definition error

Post by innominabile »

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 := .....
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post by ncrsn »

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: Select all

var start := Struct { "hp" := CInt(GetVital(caster, VITALID_LIFE) / 100), 
"x" := caster.x, "y" := caster.y, "z" := caster.z, "realm" := caster.realm };
print(start);
innominabile
Adept Poster
Posts: 85
Joined: Wed Aug 30, 2006 5:24 pm
Location: Italy

Post by innominabile »

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 { ........... } );
Locked