#1

why is this code wrong in pawn?

it says (2923) : error 030: compound statement not closed at the end of file (started at line 2889)

public OnPlayerCommandText(playerid, cmdtext[])
{
new string[256];
new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[256];
new tmp[256];
new giveplayerid, moneys, idx;
cmd = strtok(cmdtext, idx);


if(strcmp(cmd, "/ooc", true) == 0 || strcmp(cmd, "/o", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(gPlayerLogged[playerid] == 0)
{
SendClientMessage(playerid, COLOR_GREY, " You havent logged in yet !");
return 1;
}
GetPlayerName(playerid, sendername, sizeof(sendername));
new length = strlen(cmdtext);
while ((idx < length) && (cmdtext[idx] <= ' '))
{
idx++;
}
new offset = idx;
new result[64];
while ((idx < length) && ((idx - offset) < (sizeof(result) - 1)))
{
result[idx - offset] = cmdtext[idx];
idx++;
}
result[idx - offset] = EOS;
if(!strlen(result))
{
SendClientMessage(playerid, COLOR_GRAD2, "USAGE: (/o)oc [ooc chat]");
return 1;
}
format(string, sizeof(string), "(( %s: %s ))", sendername, result);
printf("%s", string);
{
return 0;
}
Reply


Messages In This Thread
/Ooc - by RoneyRemington - 23.02.2010, 18:43
Re: /Ooc - by Klutty - 23.02.2010, 18:47
Re: /Ooc - by Correlli - 23.02.2010, 18:50
Re: /Ooc - by RoneyRemington - 23.02.2010, 20:32
Re: /Ooc - by Joe Staff - 23.02.2010, 20:41
Re: /Ooc - by RoneyRemington - 23.02.2010, 23:00
Re: /Ooc - by Shubham - 24.02.2010, 10:29
Re: /Ooc - by RoneyRemington - 24.02.2010, 12:35
Re: /Ooc - by VonLeeuwen - 24.02.2010, 13:01

Forum Jump:


Users browsing this thread: 2 Guest(s)