SA-MP Forums Archive
[Help] WTF is this error - 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: [Help] WTF is this error (/showthread.php?tid=372373)



[Help] WTF is this error - Psat - 26.08.2012

Well I'm making a game mode, when I was going to compile I found this error

[quote]C:\Users\ADM WINDOW 7\Documents\gamemodes\Untitled.pwn(9 : error 030: compound statement not closed at the end of file (started at line 80)

the codes

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	new idx;
	new cmd[256];
	new string[256];

	if(strcmp(cmd, "/cmds", true) == 0) {
	SendClientMessage(playerid,COLOR_PSAT,"/cmds");
	SendClientMessage(playerid,COLOR_PSAT,"/kill");
    SendClientMessage(playerid,COLOR_PSAT,"Have you have some question? Contact some admin stuff or go to our forums <forum>");
	return 1;
  }
    if(strcmp(cmd, "/kill", true) == 0) {
    SetPlayerHealth(playerid,0);
    SetPlayerArmour(playerid,0);
    SendClientMessage(playerid,COLOR_PSAT,"You have killed yourself!!");
	return 1;
                        }



Re: [Help] WTF is this error - Scrillex - 26.08.2012

Umm I can help you with it are you in skype or somewhere.. Just error started at line 80 because your lines are just messed up... You need to correct them..


Re: [Help] WTF is this error - Moh_ - 26.08.2012

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    new idx;
    new cmd[256];
    new string[256];

    if(strcmp(cmd, "/cmds", true) == 0)
    {
        SendClientMessage(playerid,COLOR_PSAT,"/cmds");
        SendClientMessage(playerid,COLOR_PSAT,"/kill");
        SendClientMessage(playerid,COLOR_PSAT,"Have you have some question? Contact some admin stuff or go to our forums <forum>");
        return 1;
    }
   
    if(strcmp(cmd, "/kill", true) == 0)
    {
        SetPlayerHealth(playerid,0);
        SetPlayerArmour(playerid,0);
        SendClientMessage(playerid,COLOR_PSAT,"You have killed yourself!!");
        return 1;
    }
    return 0;
}