ugh sorry for bothering again :| [SOLVED] -
[Bm]rap45 - 13.02.2010
Well i been trying to get this error to go away but it seems it doesn't want to

If you could help me see something i couldn't see then please tell me
My error is
pawn Код:
(191) : error 030: compound statement not closed at the end of file (started at line 162)
and my code is
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/killme", cmdtext, true, 10) == 0) <---- line 62
{
SetPlayerHealth(playerid, 0.0);
return 1;
}
if (strcmp("/rules", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,0x418630AA,"1. Respect everyone!");
SendClientMessage(playerid,0x418630AA,"2. Do not teamkill!");
SendClientMessage(playerid,0x418630AA,"3. Do not hack/bug abuse!");
return 1;
}
if (strcmp("/objective", cmdtext, true, 10) == 0)
{
if(gTeam[playerid] == TEAM_CRACKHEAD)
{
SendClientMessage(playerid,0x418630AA,"Your objective is to kill the drug dealers");
SendClientMessage(playerid,0x418630AA,"Get the crack from the top floor");
SendClientMessage(playerid,0x41863AA,"You only have 20 minutes before the cops come!");
}
if(gTeam[playerid] == TEAM_DEFENDER)
{
SendClientMessage(playerid,0x41863AA,"Your Objective is to kill all the crackheads");
SendClientMessage(playerid,0x41863AA,"And not to let them get your crack!");
SendClientMessage(playerid,0x41863AA,"You only have 20 minutes before the cops come!");
return 1;
}
return SendClientMessage(playerid, 0x418630AA, "Command does not exist, read /commands for available commands");
} <---- line 190 so line 191 doesn't exist >:/
Re: ugh sorry for bothering again :| -
mansonh - 13.02.2010
Not enough brackets.
I use
notepad++, because it auto identifies related brackets for you, so you never have this issue.
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/killme", cmdtext, true, 10) == 0) <---- line 62
{
SetPlayerHealth(playerid, 0.0);
return 1;
}
if (strcmp("/rules", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,0x418630AA,"1. Respect everyone!");
SendClientMessage(playerid,0x418630AA,"2. Do not teamkill!");
SendClientMessage(playerid,0x418630AA,"3. Do not hack/bug abuse!");
return 1;
}
if (strcmp("/objective", cmdtext, true, 10) == 0)
{
if(gTeam[playerid] == TEAM_CRACKHEAD)
{
SendClientMessage(playerid,0x418630AA,"Your objective is to kill the drug dealers");
SendClientMessage(playerid,0x418630AA,"Get the crack from the top floor");
SendClientMessage(playerid,0x41863AA,"You only have 20 minutes before the cops come!");
}
if(gTeam[playerid] == TEAM_DEFENDER)
{
SendClientMessage(playerid,0x41863AA,"Your Objective is to kill all the crackheads");
SendClientMessage(playerid,0x41863AA,"And not to let them get your crack!");
SendClientMessage(playerid,0x41863AA,"You only have 20 minutes before the cops come!");
return 1;
}
} //<---- line 190 so line 191 doesn't exist >:/ closing bracket from if (strcmp("/objective"
return SendClientMessage(playerid, 0x418630AA, "Command does not exist, read /commands for available commands");
}
Re: ugh sorry for bothering again :| -
[Bm]rap45 - 13.02.2010
Well this never ends
i think it needs a bracket that closes the whole public thing
i tried bout 7 things now and i just get this thing
Код:
(191) : warning 209: function "OnPlayerCommandText" should return a value
Re: ugh sorry for bothering again :| -
mansonh - 13.02.2010
fixed ^
I put the new bracket on the wrong side of the error return.
Re: ugh sorry for bothering again :| -
[Bm]rap45 - 13.02.2010
WOOOOOOOOOOOOOOOOO FINALLY

this was giving me a headche xD
Gotta say without ur help i would of been sick of it right now lol Thanks alot