PDA

View Full Version : [Execution Problem]: OnPlayerSpawn


Eoussama
19/12/2016, 08:25 PM
Hello, so I have a problem that OnPlayerSpawn callback doesn't execute all information that it has,
for example, I have 72 lines in OnPlayerSpawn but only a few lines execute

Konstantinos
19/12/2016, 08:28 PM
Unless most of the code isn't placed inside if/else if/else statements that do not get executed if the expression is not true then it is likely a run time error issue which makes the code to stop. Have crashdetect plugin loaded and see the results. If nothing happens, post the code and/or debug it.

Eoussama
19/12/2016, 08:31 PM
Well, I have loads of if/else statements, would replacing it with switch fix this?

oMa37
19/12/2016, 08:33 PM
If it's possible why not? switch is faster than if/else statements.

Eoussama
19/12/2016, 08:34 PM
uh, thanks guys, problem solved,
I just used switch