Facebook Twitter YouTube Frictional Games | Forum | Privacy Policy | Dev Blog | Dev Wiki | Support | Gametee


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Timers Problem [Solved]
Montonago Offline
Junior Member

Posts: 4
Threads: 2
Joined: Feb 2011
Reputation: 0
#1
Timers Problem [Solved]

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.
(This post was last modified: 02-25-2011, 12:43 AM by Montonago.)
02-24-2011, 10:06 PM
Find
nkmol Offline
Senior Member

Posts: 252
Threads: 19
Joined: Feb 2011
Reputation: 4
#2
RE: Timers Problem

try put 1.0f or just 1, instead of 1f HuhSmile
(This post was last modified: 02-24-2011, 10:39 PM by nkmol.)
02-24-2011, 10:39 PM
Find
Nye Offline
Senior Member

Posts: 250
Threads: 8
Joined: Jan 2011
Reputation: 2
#3
RE: Timers Problem

(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.

02-24-2011, 10:49 PM
Find
Montonago Offline
Junior Member

Posts: 4
Threads: 2
Joined: Feb 2011
Reputation: 0
#4
RE: Timers Problem

Thanks for explaining that to me. It's fixed now. Smile
02-25-2011, 12:43 AM
Find




Users browsing this thread: 1 Guest(s)