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 := .....
struct definition error
Moderator: POL Developer
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.
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);
-
- Adept Poster
- Posts: 85
- Joined: Wed Aug 30, 2006 5:24 pm
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 { ........... } );
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 { ........... } );