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
item.hp -= 1;

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

Author Message
OldnGrey



Joined: 04 Feb 2006
Posts: 523

PostPosted: Sun Apr 06, 2008 11:01 am    Post subject: item.hp -= 1; Reply with 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.

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.

Author Message
*Edwards



Joined: 29 Dec 2007
Posts: 85
Location: Montreal, Canada

PostPosted: Sun Apr 06, 2008 1:01 pm    Post subject: Reply with quote

I did in my combat hook and it's not working. I shall reply here in few minutes with a reel test & confirmation.

Author Message
*Edwards



Joined: 29 Dec 2007
Posts: 85
Location: Montreal, Canada

PostPosted: Sun Apr 06, 2008 1:15 pm    Post subject: Reply with quote

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.

Author Message
ncrsn



Joined: 10 Feb 2006
Posts: 183

PostPosted: Sun Apr 06, 2008 2:38 pm    Post subject: Reply with quote

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.

Author Message
Pierce



Joined: 02 Feb 2006
Posts: 259

PostPosted: Sun Apr 06, 2008 6:17 pm    Post subject: Reply with quote

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

Author Message
OldnGrey



Joined: 04 Feb 2006
Posts: 523

PostPosted: Mon Apr 07, 2008 2:43 am    Post subject: Reply with quote

Thanks guys.
That confirms there is a bug in the distro combat scripts.

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