PenUltima Online

It is currently Sat Sep 06, 2008 6:50 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: item.hp -= 1;
PostPosted: Sun Apr 06, 2008 7:01 am 
Offline

Joined: Sat Feb 04, 2006 6:26 pm
Posts: 548
For some reason I am not able to decrement an item's hp using
item.hp -= 1;

item.hp := item.hp - 1;
does work as you'd expect.

Is there any problem with those operators when dealing with refs and not integers?
The distro combat hook has armour wear using item.hp -= 1;

So this may be a bug.
If anyone else can test this for me to confirm, it would be good.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 06, 2008 9:01 am 
Offline
User avatar

Joined: Fri Dec 28, 2007 11:19 pm
Posts: 91
Location: Montreal, Canada
I did in my combat hook and it's not working. I shall reply here in few minutes with a reel test & confirmation.

_________________
Image
FantasiaShard.com


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 06, 2008 9:15 am 
Offline
User avatar

Joined: Fri Dec 28, 2007 11:19 pm
Posts: 91
Location: Montreal, Canada
Result:

Quote:
For some reason I am not able to decrement an item's hp using
item.hp -= 1;

item.hp := item.hp - 1;
does work as you'd expect.

_________________
Image
FantasiaShard.com


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 06, 2008 10:38 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 217
AFAIK UObject member's values cannot be modified using -= += etc constructs. If I remember correctly, this is known bug, that is (too hard) to be fixed. Couldn't find the post stating so, thought.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 06, 2008 2:17 pm 
Offline

Joined: Thu Feb 02, 2006 8:33 am
Posts: 276
Quote:
AFAIK UObject member's values cannot be modified using -= += etc constructs


That's true. You can find it here:

http://forums.polserver.com/sutra8110.php&highlight=#8110


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 06, 2008 10:43 pm 
Offline

Joined: Sat Feb 04, 2006 6:26 pm
Posts: 548
Thanks guys.
That confirms there is a bug in the distro combat scripts.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl