Using the following code, the first seven messages will display "0" or "0.0" while the last seven will display "0.5" :
Event OnInit() Debug.Notification("1: " + 1 / 2) Utility.Wait(2) Float TempFloat = 1 / 2 Debug.Notification("2: " + TempFloat) Utility.Wait(2) Int i1 = 1 Int i2 = 2 Debug.Notification("3: " + i1 / i2) Utility.Wait(2) TempFloat = i1 / i2 Debug.Notification("4: " + TempFloat) Utility.Wait(2) TempFloat = i1 / i2 * 1.0 Debug.Notification("5: " + TempFloat) Utility.Wait(2) TempFloat = i1 / 2 Debug.Notification("6: " + TempFloat) Utility.Wait(2) TempFloat = 1 / i2 Debug.Notification("7: " + TempFloat) Utility.Wait(2) Debug.Notification("8: " + 1.0 / 2) Utility.Wait(2) Debug.Notification("9: " + 1 / 2.0) Utility.Wait(2) TempFloat = 1.0 / 2 Debug.Notification("10: " + TempFloat) Utility.Wait(2) TempFloat = 1 / 2.0 Debug.Notification("11: " + TempFloat) Utility.Wait(2) TempFloat = 1.0 / 2.0 Debug.Notification("12: " + TempFloat) Utility.Wait(2) TempFloat = i1 / 2.0 Debug.Notification("13: " + TempFloat) Utility.Wait(2) TempFloat = 1.0 / i2 Debug.Notification("14: " + TempFloat)EndEventI don't remember this being explained anywhere in the wiki. Is this a simple programming/scripting concept that I didn't know about?
