SA-MP Forums Archive
PAWN Compiler has crashed... - 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: PAWN Compiler has crashed... (/showthread.php?tid=352389)



PAWN Compiler has crashed... - Syntax - 19.06.2012

Everytime I try to compile my script, the PAWN compiler is crashing. I've ran a missing bracket finder, it's returning the issue that the script has a missing bracket on line 65050, however, when I goto that line, it's simply a SendClientMessage line, with no errors. I've looked in and around the lines, and I can't find any brackets without pairs.

Help?


Re: PAWN Compiler has crashed... - TyThaBomb - 19.06.2012

Post the code here, I've had this problem plenty of times.


Re: PAWN Compiler has crashed... - Syntax - 19.06.2012

Код:
else if(strcmp(text, "russia", true) == 0)
{
 PlayerInfo[playerid][pOrigin] = 5;
ClearChatbox(playerid, 10);
SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: Your character origin was set to Russian!");
RegistrationStep[playerid] = 5;
//SendClientMessage(playerid, COLOR_WHITE, "Please choose the skin id your character wants(Skin ids are posted on forums).");
OnPlayerDataSave(playerid);
SendClientMessage(playerid, COLOR_WHITE, "Please type 'continue' in your text bar to continue.");
return 0;
}
That's where I'm getting the missing bracket, on the last 'SendClientMessage' before the return 0.


Re: PAWN Compiler has crashed... - Syntax - 20.06.2012

Anyone?


Re: PAWN Compiler has crashed... - [MM]RoXoR[FS] - 20.06.2012

try using return 1;


Re: PAWN Compiler has crashed... - Mimic - 20.06.2012

Ah, I think we all hate when this happens. I don't use a missing bracket finder I simply look myself. Just scan your eyes down through the entire script. It's a long and boring process depending on how many lines your script contains but you'll find that missing bracket at the end of the day.


Re: PAWN Compiler has crashed... - kepa333 - 20.06.2012

Код:
else if(strcmp(text, "russia", true) == 0)
{
 	PlayerInfo[playerid][pOrigin] = 5;
	ClearChatbox(playerid, 10);
	SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: Your character origin was set to Russian!");
	RegistrationStep[playerid] = 5;
	SendClientMessage(playerid, COLOR_WHITE, "Please choose the skin id your character wants(Skin ids are   posted 					     on forums).");
	OnPlayerDataSave(playerid);
	SendClientMessage(playerid, COLOR_WHITE, "Please type 'continue' in your text bar to continue.");
	return 0;
}
try this im not sure if this work.


Re: PAWN Compiler has crashed... - Mimic - 20.06.2012

pawn Код:
else if(strcmp(text, "russia", true) == 0)
{
    PlayerInfo[playerid][pOrigin] = 5;
    ClearChatbox(playerid, 10);
    SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: Your character origin was set to Russian!");
    RegistrationStep[playerid] = 5;
    SendClientMessage(playerid, COLOR_WHITE, "Please choose the skin id your character wants(Skin ids are   posted                       on forums).");
    OnPlayerDataSave(playerid);
    SendClientMessage(playerid, COLOR_WHITE, "Please type 'continue' in your text bar to continue.");
    return 0;
}


pawn Код:
else if(strcmp(text, "russia", true) == 0)
{
 PlayerInfo[playerid][pOrigin] = 5;
ClearChatbox(playerid, 10);
SendClientMessage(playerid, COLOR_LIGHTRED, "SERVER: Your character origin was set to Russian!");
RegistrationStep[playerid] = 5;
//SendClientMessage(playerid, COLOR_WHITE, "Please choose the skin id your character wants(Skin ids are posted on forums).");
OnPlayerDataSave(playerid);
SendClientMessage(playerid, COLOR_WHITE, "Please type 'continue' in your text bar to continue.");
return 0;
}
You didn't change a single thing. The only thing you done was make the indentation look better. Obviously in this guys script it looks normal like yours and if not, then it wouldn't crash it would give him errors for poor indentation.


Re: PAWN Compiler has crashed... - Syntax - 21.06.2012

The script is indented properly, jsut when I tried to post it, it was moaning about characters or something. Anyway, I'll try with return 1. Thansk guys!

EDIT: 'return 1;' hasn't fixed it, it's still crashing