1 Error.
#1

Hey Guys!

I have only one error i dunno how to fix it.

Please explain or fix it to me.

Thanks for your help


Sorry for 'Bold'!

The Error:-

pawn Код:
:\Users\Davz\Desktop\Server 2\gamemodes\Demonic.pwn(1502) : error 028: invalid subscript (not an array or too many subscripts): "i"
The Code:-

pawn Код:
CMD:slapall(playerid, params[])
{
    if (!IsPlayerAdmin(playerid)) return
        SendClientMessage(playerid, 0xFFFF00AA, "You're not an Adminstrator.");
       
    new Float:x, Float:y, Float:z;
   
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerConnected(i) && (i != playerid)
        {
        PlayerPlaySound(i,1190,0.0,0.0,0.0);
        GetPlayerPos(i,x,y,z);
        SetPlayerPos(i,x,y,z+5);
    }
    return 1;
}
Reply
#2

You forgot multiple brackets.

for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i) && (i != playerid))
{
PlayerPlaySound(i,1190,0.0,0.0,0.0);
GetPlayerPos(i,x,y,z);
SetPlayerPos(i,x,y,z+5);
}
}
Reply
#3

Thanks, That what i was thinking but i thought it was wrong.

Thanks very much
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)