Posts: 1,076
Threads: 70
Joined: Jul 2016
Reputation:
0
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
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
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.
Posts: 1,076
Threads: 70
Joined: Jul 2016
Reputation:
0
Well, I have loads of if/else statements, would replacing it with switch fix this?
Posts: 928
Threads: 13
Joined: Feb 2016
Reputation:
0
If it's possible why not? switch is faster than if/else statements.
Posts: 1,076
Threads: 70
Joined: Jul 2016
Reputation:
0
uh, thanks guys, problem solved,
I just used switch