The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 906 - File: showthread.php PHP 7.2.24-0ubuntu0.18.04.17 (Linux)
File Line Function
/showthread.php 906 errorHandler->error



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 Having a "while" loop problem(possible overload)
Silent Darkness Offline
Junior Member

Posts: 37
Threads: 9
Joined: Jul 2012
Reputation: 0
#1
Having a "while" loop problem(possible overload)

I want to have a section of script that temporarily makes it so that the player is forced to crouch.

PHP Code: (Select All)
while(OnyourKnees >= 1)
  {
  
SetPlayerCrouching(true);
  } 

Running this at any point in the script causes any script code further along the line to simply not run at all, putting the map at a complete standstill. I'm not sure why this is.

Are while loops supposed to risk freezing up the entire script file?
(This post was last modified: 09-19-2013, 08:21 PM by Silent Darkness.)
09-19-2013, 08:18 PM
Find


Messages In This Thread
Having a "while" loop problem(possible overload) - by Silent Darkness - 09-19-2013, 08:18 PM



Users browsing this thread: 1 Guest(s)