Author Topic: Breaking onActivate  (Read 2274 times)

That's what happens when you type on a phone, oh wait you don't have a social life to know about that.  :cookieMonster:

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.
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.

> 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.

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...)

oh wait you don't have a social life to know about that.  :cookieMonster:
No man... nooooo...


I know :/ a bit too harsh.
I'm pretty sure people have been banned for saying stuff like that.