Blockland Forums > Modification Help
Breaking onActivate
<< < (4/5) > >>
Superb:
That's what happens when you type on a phone, oh wait you don't have a social life to know about that.  :cookieMonster:
jes00:

--- Quote from: Superb on November 20, 2011, 01:33:22 PM ---Change if(%clien.tOre <= 1) to if(%client.Ore > 0)

Its pretty obvious, you should spend lest time having people write code for you, and more time reading torque script documents to learn the basics.

--- End quote ---
No, it should be if(%client.Ore >= 1) because then it checks if it's equal to one or higher.
Anyways, that's no the problem because when I activate it, it should be saying "You do not have enough resources to sell." but it's not.
Superb:
> 0 and >= 1 are the same thing, which proves my point further you need to read torque script documents. It will help you out a lot trust me.
Uristqwerty:
They are not the same unless you can guarantee that the number is an integer. They react differently to numbers between 0 and 1, so everything from 0.000...1 to 0.999...

If you know it will always be an integer, pick the one you prefer, as they will give identical results. (Then again, > 0 will be consistant for both floats above one, and between zero and one, so could be considered more accurate in that sense. >= 1 will be more realistic, though, if you think of it from the perspective of whomever you are selling to not accepting such tiny quantities, having a minimum purchase size. Pick one...)
Destiny/Zack0Wack0:

--- Quote from: Superb on November 20, 2011, 01:54:13 PM ---oh wait you don't have a social life to know about that.  :cookieMonster:

--- End quote ---
No man... nooooo...
Navigation
Message Index
Next page
Previous page

Go to full version