Nevermind, figured it out
Nevermind, figured it out
Last edited by Footy; 07-26-2012 at 06:52 PM.
Thx Euphemism and Vinyl for the awesome siggy and avatar!
That's because you haven't understood the binary-OR operator.. aka Logical-OR. If you don't understand it, I'm almost certain you will use Logical-AND/XOR wrong as well as they are both used the same way.
You can't do: 5 or 10 or 15 or 20
if you do, the result will be 31.
5 or 10 or 15 or 20 = 31.
You have to do:
Simba Code:if ((counter = 5) or (counter = 10) or (counter = 15) or (counter = 20)) then..
You do not need the extra brackets but it's there for distinguishing ambiguity.. The above is the same as:
Simba Code:if (counter = 5 or counter = 10 or counter = 15 or counter = 20) then..
but I have high standards and the brackets make it easier to read so I recommend using them.
Last edited by Brandon; 07-26-2012 at 07:00 PM.
I am Ggzz..
Hackintosher
This is my first programming language, so I had no idea that equaled 31... Ill use your way instead, thanks!
E: got a type mismatch error when I tried it...
E: typed it like this to get it working
Simba Code:if (counter = 5) or (counter = 10) or (counter = 15) or (counter = 20) then
Last edited by Footy; 07-26-2012 at 08:51 PM.
Thx Euphemism and Vinyl for the awesome siggy and avatar!
There are currently 1 users browsing this thread. (0 members and 1 guests)