if(strcmp(cmd, "/factionanunt", true) == 0 || strcmp(cmd, "/facan", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pRank] < 5) { SendClientMessage(playerid, COLOR_GREY, " Trebuie sa ai rankul in factiune mai mare ca 5 !"); return 1; } 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: (/fac)tionanunt [text]"); return 1; } if(PlayerInfo[playerid][pMember] == 1||PlayerInfo[playerid][pLeader] == 1) { format(string, sizeof(string), "Anunt Factiune: %s", result); SendClientMessageToAll(COLOR_DBLUE, string); } } return 1; }
C:\Documents and Settings\vlad\Desktop\vladgm\vladgm\gamemodes\gf.p wn(1913 : error 017: undefined symbol "idx" C:\Documents and Settings\vlad\Desktop\vladgm\vladgm\gamemodes\gf.p wn(19140) : error 017: undefined symbol "idx" C:\Documents and Settings\vlad\Desktop\vladgm\vladgm\gamemodes\gf.p wn(19142) : error 017: undefined symbol "idx" C:\Documents and Settings\vlad\Desktop\vladgm\vladgm\gamemodes\gf.p wn(19142) : error 017: undefined symbol "idx" C:\Documents and Settings\vlad\Desktop\vladgm\vladgm\gamemodes\gf.p wn(19142) : error 029: invalid expression, assumed zero C:\Documents and Settings\pwaah\Desktop\vladgm\vladgm\gamemodes\gf. pwn(19142) : fatal error 107: too many error messages on one line
if(strcmp(cmd, "/factionanunt", true) == 0 || strcmp(cmd, "/facan", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pRank] < 5) { SendClientMessage(playerid, COLOR_GREY, " Trebuie sa ai rankul in factiune mai mare ca 5 !"); return 1; } new idx; 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, -1, "USAGE: (/fac)tionanunt [text]"); return 1; } if(PlayerInfo[playerid][pMember] == 1) { format(string, sizeof(string), "Anunt Factiune: %s", result); SendClientMessageToAll(COLOR_DBLUE, string); } } return 1; }
format(string, sizeof(string), "Anunt Factiune: %s", result); SendFamilyMessage(1, COLOR_DBLUE, string);
how is anyone supposed to know what idx means? From the look of it you ripped that code off another script...
|
C:\Documents and Settings\vladgm\Desktop\gf.pwn(21880) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\vladgm\Desktop\gf.pwn(21881) : error 028: invalid subscript (not an array or too many subscripts): "cmdtext" C:\Documents and Settings\vladgm\Desktop\gf.pwn(21881) : error 029: invalid expression, assumed zero C:\Documents and Settings\vladgm\Desktop\gf.pwn(21881) : error 029: invalid expression, assumed zero C:\Documents and Settings\vladgm\Desktop\gf.pwn(21881) : fatal error 107: too many error messages on one line Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 5 Errors.