PDA

View Full Version : [Help] WTF is this error


Psat
26/08/2012, 10:48 AM
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(98) : 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;
}

Scrillex
26/08/2012, 10:50 AM
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..

Moh_
26/08/2012, 10:51 AM
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;
}