PenUltima Online

It is currently Sat Sep 06, 2008 9:15 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: struct definition error
PostPosted: Wed Apr 02, 2008 2:28 pm 
Offline

Joined: Wed Aug 30, 2006 5:24 pm
Posts: 82
Location: Italy
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 := .....

_________________
Admin/Scripter Innominabile
ZuluHotelItalia shard on m4d


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 03, 2008 7:13 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 217
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);


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 03, 2008 9:39 am 
Offline

Joined: Wed Aug 30, 2006 5:24 pm
Posts: 82
Location: Italy
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 { ........... } );

_________________
Admin/Scripter Innominabile
ZuluHotelItalia shard on m4d


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl