09.10.2013, 15:28
I was trying to add a org system in but i keep getting this error with the code
LINE 2036 IS IN RED!
Quote:
C:\Users\Hussain\Desktop\PulseRP v0.1\gamemodes\PRP.pwn(2036) : error 028: invalid subscript (not an array or too many subscripts): "Member" C:\Users\Hussain\Desktop\PulseRP v0.1\gamemodes\PRP.pwn(2036) : warning 215: expression has no effect C:\Users\Hussain\Desktop\PulseRP v0.1\gamemodes\PRP.pwn(2036) : error 001: expected token: ";", but found "]" C:\Users\Hussain\Desktop\PulseRP v0.1\gamemodes\PRP.pwn(2036) : error 029: invalid expression, assumed zero C:\Users\Hussain\Desktop\PulseRP v0.1\gamemodes\PRP.pwn(2036) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 4 Errors. |
Quote:
if(strcmp(cmd, "/oc", true) == 0) { if(Member[playerid] == -255) return 0; new length = strlen(cmdtext); new playername[MAX_PLAYERS]; new string[256]; 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)) return SendClientMessage(playerid, COLOR_WHITE, "USAGE: /oc [text]"); GetPlayerName(playerid, playername, sizeof(playername)); format(string,sizeof(string),"OrgChat - %s : %s", playrename,result); if(Member[playerid] != -255) { for(new i=0;i<MAX_PLAYERS;i++) { if(IsPlayerConnected(i) && Member[i] == Member[playerid]) SendClientMessage(i,COLOR_MAIN,string); } } return 1; } |