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
unexpected end of file, what's the problem?
Cranky Old Man Offline
Posting Freak

Posts: 986
Threads: 20
Joined: Apr 2012
Reputation: 38
#7
RE: unexpected end of file, what's the problem?

(04-21-2012, 05:59 PM)P44RTHURN4X Wrote: No, this also don't works anyway... So I have to make maps completely without Timer-Scripting Sad

Updated:
SetSwingDoorOpen("carbinet_smash_obj", ture, true);
PlaySoundAtEntity("react_pant_snt", "enemy_hallucination_disappear.snt", 0, false);

Simply proof-reading your code could go a long way, and you should also download either Geany or Notepad++ to do some of your proof-reading for you.

I removed two of the errors, because I saw that they were names.


Edit 3:
After actually looking at the code, I spotted it: You're calling each timer twice, essentially ending what you're doing a microsecond after you've done it. Don't call them at the same time. Actually, don't call the functions twice at all.

If we're going to use SilentStrikers code:

AddTimer("Timer_1",    2,  "StartTimers");
AddTimer("Timer_1_2",  4, "StartTimers");
AddTimer("Timer_2",    6,  "StartTimers");
AddTimer("Timer_2_2",  8, "StartTimers");
AddTimer("Timer_3",   10,  "StartTimers");
AddTimer("Timer_3_2", 12, "StartTimers");
}


void StartTimers(string &in asTimer)
{
if(asTimer == "Timer_1")
  {
  //Do stuff
  }
else if(asTimer == "Timer_1_2")
  {
  //Do Other stuff
  }
else if(asTimer == "Timer_2")
  {
  // Do even more stuff
  }

// ...and so on...

}


Noob scripting tutorial: From Noob to Pro

(This post was last modified: 04-21-2012, 06:49 PM by Cranky Old Man.)
04-21-2012, 06:17 PM
Find


Messages In This Thread
RE: unexpected end of file, what's the problem? - by Cranky Old Man - 04-21-2012, 06:17 PM



Users browsing this thread: 1 Guest(s)