DX script help! Or why is 2 not smaller than 15?
OK, somebody explains this to me please...
Say I have this code:
Sub Object_OnScriptEnter
Object.SetTimer 9882, 5000
Object.PersistStorage("current") = 0
Object.PersistStorage("WPNum") = 15
End Sub
Sub Object_OnTimer9882
If Object.PersistStorage("current") < Object.PersistStorage("WPNum") Then
msgbox Object.PersistStorage("current") & " is smaller than " & Object.PersistStorage("WPNum")
Else
msgbox Object.PersistStorage("current") & " is not smaller than " & Object.PersistStorage("WPNum")
End If
Object.PersistStorage("current") = Object.PersistStorage("current") + 1
End Sub
Now, the output of this would be msgboxes like this:
0 is smaller than 15
1 is smaller than 15
2 is not smaller than 15
3 is not smaller than 15
etc.
Now, how is that? There is something I don't understand. I've already checked that the returned values were numeric with the IsNumeric function, and they are.
I really need help on this please.