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
Script Help Switch (Case/Break thingy)
CarnivorousJelly Offline
Posting Freak

Posts: 1,196
Threads: 41
Joined: Dec 2012
Reputation: 80
#4
RE: Switch (Case/Break thingy)

(09-25-2013, 08:40 AM)JustAnotherPlayer Wrote: I don't see you even calling StartPlayerLookAt yet you're using StopPlayerLookAt.
"StartPlayerLookAt("area_entitylook", 1.0f, 2.0f, "");" (L5)
" StartPlayerLookAt("area_look1", 2.0f, 4.0f, ""); //Floor" (L5 of Case 8)
There's at least two places I used StartPlayerLookAt... but that's not the point, so I'm going to move on.
(09-25-2013, 08:40 AM)JustAnotherPlayer Wrote: Also, the reason why it's not working, you have to match the same number var with the case number.
Care to elaborate on what you mean? Like I said: first time using case/break and I barely know what I'm doing.

(09-25-2013, 12:00 PM)Amn Wrote: Inside your function timer_wakeup you have a name of a variable wrong:

The counter++ AddLocalVarInt("var_wakup", 1);

And the check at the bottom if (GetLocalVarInt("var_wakeup") <9)

Since var_wakeup it's gonna return 0, the timer is gonna get called every time.

Additionally, since the switch function above failed to find any match after case 9, the variable SectionSpeed remains with 0.0f, as it was initially declared, creating an infinite timer.

And when your computer can't handle it, it crashes.
Ohhhhhh I didn't notice the typo D: Well, that's embarrassing c: Thank you!

[Image: quote_by_rueppells_fox-d9ciupp.png]
09-25-2013, 06:37 PM
Find


Messages In This Thread
Switch (Case/Break thingy) - by CarnivorousJelly - 09-25-2013, 07:55 AM
RE: Switch (Case/Break thingy) - by Daemian - 09-25-2013, 12:00 PM
RE: Switch (Case/Break thingy) - by CarnivorousJelly - 09-25-2013, 06:37 PM
RE: Switch (Case/Break thingy) - by Kreekakon - 09-25-2013, 06:48 PM



Users browsing this thread: 1 Guest(s)