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
#4
RE: unexpected end of file, what's the problem?

(04-20-2012, 05:58 PM)SilentStriker Wrote: When making if timers I would suggest you make it like this since it's easier:

here's an example
AddTimer("1", 2, "StartTimers");
AddTimer("2", 4, "StartTimers");
AddTimer("3", 6, "StartTimers");

void StartTimers(string &in asTimer)
{
if(asTimer == "1")
  {
    //Do stuff
  }
else if(asTimer == "2")
  {
   //Do Other stuff
  }
else if(asTimer == "3")
  {
  // Do even more stuff
  }
}
Well, there's always "case" if you are looking to optimize.


Noob scripting tutorial: From Noob to Pro

04-20-2012, 06:04 PM
Find


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



Users browsing this thread: 1 Guest(s)