Numbered Steps to Reproduce Problem:Use the ! operator instead of the if else statement shown in the code snippet below
Code Snippet (if applicable) to Reproduce Problem:
The code workaround
if(copytext(Number,1+Current_Number,2+Current_Number) in list("0","1","2","3","4","5","6","7","8","9"))
else
return 0
the not working code
if(!copytext(Number,1+Current_Number,2+Current_Number) in list("0","1","2","3","4","5","6","7","8","9"))
return 0
Expected Results:The not operator to make it so if the copytext function copies a value not shown in the list for it to return 0.
Also if I placed it wrong here than maybe you can tell me where it should be, but I tried before and after every word/function & before & after the if inside and outside the () & still nothing.
Actual Results:It always fails to call it whether its true or not if you add the ! & remove the else, with else in there, it always calls the else statement of the code if one exists.
Does the problem occur:
Every time? Or how often?Every Time
In other games?All Projects
In other user accounts?All user accounts.
On other computers?All computers, one of them is windows 7 but they all run the same version of BYOND, I used statements like this with similar commands, maybe even identical in the past, and it has worked, but for some reason, either because the command used(copytext) or something else is preventing it from working here.
When does the problem NOT occur?Always
Did the problem NOT occur in any earlier versions? If so, what was the last version that worked? (Visit http://www.byond.com/download/build to download old versions for testing.)
Not sure, untested so far.
Workarounds:Use an if, else statement instead.
If this is tested using similar code to this & found to be working I can send the code to an e-mail address so the problem can be found.