error 001: expected token: ";", but found "]
#1

Quote:

error 028: invalid subscript (not an array or too many subscripts): "Duel"
warning 215: expression has no effect
error 001: expected token: ";", but found "]"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Код:
    if(Duel[playerid] >=1) return SendClientMessage(playerid,COLOR_GREEN, "You're already in a duel.");
Reply
#2

Show us your Duel variable.
Reply
#3

dunno why
Quote:

CMD:duel(playerid,params[])
{
new PID;
if(DuelToggle == true)return SendClientMessage(playerid,COLOR_GREEN,"You're not allowed to use this command.");
if(sscanf(params,"u",PID))return SendClientMessage(playerid,COLOR_GREEN,"/duel [id]");
if(!IsPlayerConnected(PID)) return SendClientMessage(playerid,COLOR_GREEN,"There is no player with this id.");
if(Duel[playerid] >=1) return SendClientMessage(playerid,COLOR_GREEN, "You're already in a duel.");
{
if(Duel[PID] >=1)
{
SendClientMessage(playerid,COLOR_MAGENTA,"* This player is already in a duel.");
}
else
{
if(PID == playerid) return SendClientMessage(playerid,COLOR_GREEN,"You can't duel yourself.");
Duelmaker[PID] = playerid;
Duelopponent[playerid] = PID;
Gotrequest[PID] = 1;
Maderequest[playerid] = 1;
ShowPlayerDialog(playerid, DIALOG_DUELWEAPONS, DIALOG_STYLE_LIST, "{FF00FF}First Duelweapon","{F0F8FF}Desert Eagle\n{F0F8FF}Shotgun\n{F0F8FF}Sawnoff Shotgun\n{F0F8FF}Combat Shotgun\n{F0F8FF}Micro SMG\n{F0F8FF}MP5\n{F0F8FF}AK-47\n{F0F8FF}M4\n{F0F8FF}Tec-9\n{F0F8FF}Country Rifle\n{F0F8FF}Sniper Rifle\n{F0F8FF}Fist\n{F0F8FF}Knife\n{F0F8FF}Katana \n{F0F8FF}Chainsaw\n{F0F8FF}Colt\n{F0F8FF}Silenced 9mm","Okey","");
}
}
return 1;
}

Reply
#4

No, post the declaration of the variable.
Reply
#5

i dunno anything about variable.
Reply
#6

Quote:
Originally Posted by suni
Посмотреть сообщение
i dunno anything about variable.
new Duel[MAX_PLAYERS];?
Reply
#7

oh yes but nvm i forgot to those codes(thanks for reminding me). thanks for the help guys +rep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)