Frictional Games Forum (read-only)
Timers Problem [Solved] - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: Amnesia: The Dark Descent (https://www.frictionalgames.com/forum/forum-6.html)
+--- Forum: Custom Stories, TCs & Mods (https://www.frictionalgames.com/forum/forum-35.html)
+--- Thread: Timers Problem [Solved] (/thread-6705.html)



Timers Problem [Solved] - Montonago - 02-24-2011

I've been scripting on my Custom Story for awhile, and I had one timer included in the lever. Now, I tried to add more, and it keeps giving me a fatal error when I try to startup the level.

Fatal error: Could not load script file. (##,##) expected ")" or ",".

It wants me to put it here:

AddTimer("hitglass"*Here*, 1f, "hitglasstimer");

What could be wrong here? Please note that this timer was fully functional before I tried to add another timer.


RE: Timers Problem - nkmol - 02-24-2011

try put 1.0f or just 1, instead of 1f HuhSmile


RE: Timers Problem - Nye - 02-24-2011

(02-24-2011, 10:39 PM)nkmol Wrote: try put 1.0f or just 1, instead of 1f HuhSmile

Yes, 1f wont work.

When scripting a "float" integer, it is good practice to use just an integer by itself (eg. 5, 12, 18, 3, 1) if you dont want to use decimals. Use the 'f' character if you are going to use decimals. (eg. 4.003f, 2.6f, 12.753f).

I think the limit is three decimal places also. An integer + 'f' will not work and flag an error.


RE: Timers Problem - Montonago - 02-25-2011

Thanks for explaining that to me. It's fixed now. Smile