Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (OptimusPrime, AndrewAMD), 14,580 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
rise overrun issue #66220
03/13/06 05:35
03/13/06 05:35
Joined: Sep 2002
Posts: 199
Chicago, Illinois
Thehawk Offline OP
Member
Thehawk  Offline OP
Member

Joined: Sep 2002
Posts: 199
Chicago, Illinois
Hello,

I'm trying to figure out this problem. When I enter this code:

Code:

function pickup3 ()
{

if (event_type == event_impact)
{
if (my.pickup_type == 3)
{
if(int(you.health)<100)
{
you.health = min(you.health +my.units, 100);
ent_remove (me);
}
}
}
}

[/code}

I get an error message that says that

Code:

you.health = min(you.health +my.units, 100);



causes a rise overrun issue in the code.

Why is this? What should I do to prevent this issue? I got the issue once before but I cannot reember how I fixed it. thanks in advance for any help.

Re: rise overrun issue [Re: Thehawk] #66221
03/13/06 20:08
03/13/06 20:08
Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Xarthor Offline
Expert
Xarthor  Offline
Expert

Joined: Jul 2002
Posts: 4,436
Germany, Luebeck
Maybe write:
Code:

temp = you.health + my.units;
you.health = min(temp,100);



Dunno if this helps, but its worth a try, isn't it?


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1