| Blockland Forums > Modification Help |
| Schedules Going Haywire!? |
| << < (3/5) > >> |
| Uristqwerty:
Torque uses strings fairly often, possibly for everything. Add one to a string that starts with a number followed by non-numeric characters, and it ignores everything but the number. Schedule probably demands an integer only, so probably only reads up to the first non-number, even though the rest would be a valid number for a floating point type. So, it probably takes the first 1.8, discarding the rest, and occurs almost instantly. Test results: 1e8: instant 1e7: instant 1e6: instant 1e5: delayed 1e4: delayed 10000000000000000000: delayed 10000000000000000000+1: instant ... 1000000+1: instant 100000+1: delayed 999999+1:instant 999998+1:delayed 1000000-1:delayed Conclusion: Schedule can accept arbitrarily long integer constants, but numbers at or above one million that are the results of any sort of math will not work. Also, storing a very long number in a variable and then using it has no problem, as long as no math is involved. Untested: passed as a function argument, returned from a function. Also: string functions do not cause long numbers to become short. So, my conclusion: schedule will not accept a floating point number at or above one million, but will accept a string or unaltered number above one million. Edit: numbers at or above one million with a decimal will become instantaneous, too. |
| Pew446:
--- Code: ---echo(31313311 *3); --- End code --- Returns 93939933 --- Code: ---$var = 31313311; $var2 = 3; $var3 = $var * $var2; echo($var3); --- End code --- Returns 93939936 ??? |
| Kalphiter:
--- Quote from: Pew446 on October 09, 2010, 11:02:14 PM --- --- Code: ---$var = 31313311; $var2 = 3; $var3 = $var * $var2; echo($var3); --- End code --- Returns 93939936 --- End quote --- 9.39399+e007 |
| Pew446:
--- Quote from: Kalphiter on October 09, 2010, 11:05:53 PM ---9.39399+e007 --- End quote --- Wheeps. |
| otto-san:
--- Quote from: Ephialtes on October 09, 2010, 08:17:20 PM ---No it's not the same. As I said - Torque can't deal with big numbers. 1.8e+006 is a big number. --- End quote --- Yeah. That's what I meant. |
| Navigation |
| Message Index |
| Next page |
| Previous page |