23.02.2010, 20:32
now i get this error. and it looks like this
error
code
error
Код:
C:\Users\TJ's Server\Desktop\Server SA-MP\gamemodes\WEWFGRP.pwn(2935) : error 030: compound statement not closed at the end of file (started at line 2881)
Код:
public OnPlayerCommandText(playerid, cmdtext[]) { new cmd[256]; new tmp[256]; new Message[256]; new gMessage[256]; new pName[MAX_PLAYER_NAME+1]; new iName[MAX_PLAYER_NAME+1]; new idx; new string[256]; new playermoney; new sendername[MAX_PLAYER_NAME]; new giveplayer[MAX_PLAYER_NAME]; new playername[MAX_PLAYER_NAME]; 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 !"); } 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 1; } }