SA-MP Forums Archive
[Execution Problem]: OnPlayerSpawn - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Execution Problem]: OnPlayerSpawn (/showthread.php?tid=624614)



[Execution Problem]: OnPlayerSpawn - Eoussama - 19.12.2016

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


Re: [Execution Problem]: OnPlayerSpawn - Konstantinos - 19.12.2016

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.


Re: [Execution Problem]: OnPlayerSpawn - Eoussama - 19.12.2016

Well, I have loads of if/else statements, would replacing it with switch fix this?


Re: [Execution Problem]: OnPlayerSpawn - oMa37 - 19.12.2016

If it's possible why not? switch is faster than if/else statements.


Re: [Execution Problem]: OnPlayerSpawn - Eoussama - 19.12.2016

uh, thanks guys, problem solved,
I just used switch