13.06.2012, 20:14
Well, this is the code, it doesn't seem to work, I don't know whats wrong
My errors that Iam getting
Line 1030
Line 1018
Код:
//------[Makeleader]------- FactionLeader[playerid] = 0; COMMAND:makeleader(playerid, params[]) { if(PlayerInfo[playerid][Adminlevel] < 1) return SendClientMessage(playerid,COLOR_ERROR,"[ERROR]: You are not authorized to use this command "); new targetid; new giveplayerid; if(sscanf(params, "is[24]", targetid)) return SendClientMessage(playerid, COLOR_SYNTAX, "[SYNTAX]: /makeleader [PlayerID/PartOfName]"); else if(giveplayerid == INVALID_PLAYER_ID) return SendClientMessage(playerid,WHITE,"[ERROR] Player Is Not Connected"); else { SendClientMessage(targetid,COLOR_GREEN, "You have been made a faction leader!"); FactionLeader[targetid] += 1; } return 1; }
Код:
C:\Users\GTW\BaseNorton V2\gamemodes\Gamemode.pwn(1018) : error 010: invalid function or declaration C:\Users\GTW\BaseNorton V2\gamemodes\Gamemode.pwn(1030) : error 028: invalid subscript (not an array or too many subscripts): "FactionLeader" C:\Users\GTW\BaseNorton V2\gamemodes\Gamemode.pwn(1030) : warning 215: expression has no effect C:\Users\GTW\BaseNorton V2\gamemodes\Gamemode.pwn(1030) : error 001: expected token: ";", but found "]" C:\Users\GTW\BaseNorton V2\gamemodes\Gamemode.pwn(1030) : error 029: invalid expression, assumed zero C:\Users\GTW\BaseNorton V2\gamemodes\Gamemode.pwn(1030) : fatal error 107: too many error messages on one line
Код:
FactionLeader[targetid] += 1;
Код:
FactionLeader[playerid] = 0;