add a tenth of a number
by Joseph Bosch · in Torque X 2D · 03/12/2012 (12:31 pm) · 1 replies
for some reason i keep getting an error when trying to use a tenth of a number
for instance
%x = 5;
%x = %x + .1;
the line %x = %x + .1; will always throw
gameScripts/server/time.cs Line: 10 - parse error
>>> Advanced script error report. Line 10.
>>> Some error context, with ## on sides of error halt:
i suppose i could do somthing like
%y = 0;
%y = %y + 1;
%time = setword(%time, 0, %x);
%time = setword(%time, 1, ".");
%time = setword(%time, 2, %y);
but this seems a bit needles if i can get it too add tenths.
for instance
%x = 5;
%x = %x + .1;
the line %x = %x + .1; will always throw
gameScripts/server/time.cs Line: 10 - parse error
>>> Advanced script error report. Line 10.
>>> Some error context, with ## on sides of error halt:
i suppose i could do somthing like
%y = 0;
%y = %y + 1;
%time = setword(%time, 0, %x);
%time = setword(%time, 1, ".");
%time = setword(%time, 2, %y);
but this seems a bit needles if i can get it too add tenths.
Torque 3D Owner Tim Scheiman
Ghost Ship Studios
%x = %x + 0.1;
Should work.
:)