![]() |
Math!
Hmm, what's wrong with these? Addition is the same way, and works fine, but none of these work x_X (the reason for the temp.display is to make the display flash, but still save the date for the block)
PHP Code:
|
Why use sleep? :confused:
|
Quote:
|
Quote:
Edit: If it's going to blip only a certain times, use a for loop. |
I don't think the blip is contributing to the math errors. For example, 8-6 is not -14, however, that's what's showing up
|
It would be useful to see the rest of the algorithm in trying to come to a solution.
EDIT: And those are GS1 sleeps, not GS2 |
Quote:
Since they're all the same (and none but addition work): PHP Code:
PHP Code:
|
The script looks ok, but the rest of the script which you have not shown might make problems, e.g. when calling setTimer(time) or setting timeout = time then 'sleeps' are stopped. You could eventually use scheduleevent(delay,action,params)
|
This may be a problem with what 'this.total' contains before/after you hit the subtraction sign.
|
Quote:
NPC Code:this.total-=temp.display should be NPC Code:this.total = temp.display It seems to me what you are actually doing is 0 + 8 + 6 = 14 <- is correct 0 - 8 - 6 = -14 0 * 8 * 6 = 0 0 / 8 / 6 = 0 |
| All times are GMT +2. The time now is 02:41 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.