SA-MP Forums Archive
OnPlayerSpawn is crashing pawn compiler - 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: OnPlayerSpawn is crashing pawn compiler (/showthread.php?tid=629122)



OnPlayerSpawn is crashing pawn compiler - Aerotactics - 20.02.2017

http://pastebin.com/YShDD6Uu

I don't know what's causing it.

EDIT:

It's defined with MAX_PLAYERS and is defined as a boolean. I tried converting it into an integer, and it still crashes. I've never had this issue happen before, and I'm starting to think it's a bug in the compiler.

PHP код:
//IsPlayerLoggedIn[playerid] = true; 
EDIT2: RESOLVED using Zeex's Pawn Compiler (it compiled properly)


Re: OnPlayerSpawn is crashing pawn compiler - Vince - 20.02.2017

Use the "wolf fence" debugging method. Comment out half of the code. If it still crashes it's in the part that isn't commented and else it is in the part that is commented. Repeat with ever smaller chunks until you find the culprit.


Re: OnPlayerSpawn is crashing pawn compiler - Aerotactics - 20.02.2017

Quote:
Originally Posted by Vince
Посмотреть сообщение
Use the "wolf fence" debugging method. Comment out half of the code. If it still crashes it's in the part that isn't commented and else it is in the part that is commented. Repeat with ever smaller chunks until you find the culprit.
It's this section collectively (and only started crashing after I moved "IsPlayerLoggedIn", but even after I moved it back to its original line, it still crashes):

EDIT: Got smaller

EDIT2: If I take the IsPlayerLoggedIn out of the loop, the loop compiles, but the 1 line doesn't and there's no reason for it not to compile. It's defined with MAX_PLAYERS and is defined as a boolean. I tried converting it into an integer, and it still crashes. I've never had this issue happen before, and I'm starting to think it's a bug in the compiler.

PHP код:
//IsPlayerLoggedIn[playerid] = true;