SA-MP Forums Archive
Pawno Compiler Crash , Please help - 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: Pawno Compiler Crash , Please help (/showthread.php?tid=414992)



Pawno Compiler Crash , Please help - Arnoo - 11.02.2013

Hello
Im trying to edit my script but it somehow crashed.
I've been editing these lines.
Код:
    if(IsPlayerConnected(playerid))
    {
        new string[128];
        new sendername[MAX_PLAYER_NAME];
		GetPlayerNameEx(playerid, sendername, sizeof(sendername));
    	new rand = random(sizeof(HospitalSpawns));
    	if(rand == 0)
    	{
        	SetPlayerPos(playerid, 1192.256836, -1304.637939, 7.0000);
			SetPlayerCameraPos(playerid, -2551.79, 2313.97, 26.20);
			SetPlayerCameraLookAt(playerid, -2530.35, 2346.20, 7.97);
			if(PlayerInfo[playerid][pWantedLevel] > 0)
			{
			    SendClientMessage(playerid,COLOR_YELLOW,"The Bayside Police Department has been informed of your current location.");
			    SendCopMessage(TEAM_BLUE_COLOR, "HQ: All Units APB: Reporter: Bayside Hospital Staff");
				format(string, sizeof(string), "HQ: Crime: Unknown, Suspect: %s",sendername);
				SendCopMessage(TEAM_BLUE_COLOR, string);
			}
    	}
    	else
    	{
        	SetPlayerPos(playerid, 2012.323608, -1436.354370, 5.0000);
			SetPlayerCameraPos(playerid, -2551.79, 2313.97, 26.20);
			SetPlayerCameraLookAt(playerid, -2530.35, 2346.20, 7.97);
			if(PlayerInfo[playerid][pWantedLevel] > 0)
			{
			    SendClientMessage(playerid,COLOR_YELLOW,"The Bayside Police Department has been informed of your current location.");
				SendCopMessage(TEAM_BLUE_COLOR, "HQ: All Units APB: Reporter: Bayside Hospital Staff");
				format(string, sizeof(string), "HQ: Crime: Unknown, Suspect: %s",sendername);
				SendCopMessage(TEAM_BLUE_COLOR, string);

			}
    	}


Please help me.


Re: Pawno Compiler Crash , Please help - Arnoo - 11.02.2013

Sorry sir.
I just dont want to put the whole code here.
All I did is edit the position of the camera and the LookAt.
Then it said 'Pawno Compiler Libary has stopped working'.
Please help me. Its important for me.


Re: Pawno Compiler Crash , Please help - Arnoo - 11.02.2013

Sorry but I dont understand what you mean with that.
I have no english lessons in school.
Excuse me.


Re: Pawno Compiler Crash , Please help - Jewell - 11.02.2013

he said to post your code clearly.. then it is easy to understand. use [ pawn] [/ pawn] tags.


i can't see the problem in your code, but why you use GetPlayerNameEx ? try to compile it with GetPlayerName(playerid, sendername, sizeof(sendername)); (but i don't think that was the cause to crash your pawno)


Re: Pawno Compiler Crash , Please help - LarzI - 11.02.2013

http://en.wikipedia.org/wiki/Indent_style#Allman_style