SA-MP Forums Archive
Error !! Help ! - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Error !! Help ! (/showthread.php?tid=469670)



Error !! Help ! - z0nzjn123 - 14.10.2013

pawn Code:
pawn Код:
else if(listitem == 5)
            {
                if(!IsPlayerInAnyVehicle(playerid))
                {
                    if(GetPVarType(playerid, "pBoomBox"))
                    {
                        SendClientMessage(playerid, COLOR_WHITE, "You have turned off the boom box.");
                        foreach(Player, i) if(IsPlayerInDynamicArea(i, GetPVarInt(playerid, "pBoomBoxArea"))) StopAudioStreamForPlayerEx(i);
                        DeletePVar(playerid, "pBoomBoxStation");
                    }
                    else
                    {
                        StopAudioStreamForPlayerEx(playerid);
                    }
                }
                else
                {
                    format(string, sizeof(string), "* %s da tat dai phat thanh.", GetPlayerNameEx(playerid), string);
                    ProxDetector(10.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
                    foreach(Player, i) if(GetPlayerVehicleID(i) == GetPlayerVehicleID(playerid))
                    {
                        StopAudioStreamForPlayerEx(i);
                    }
                    stationidv[GetPlayerVehicleID(playerid)][0] = 0;
                }
            }
        }
    }
Error
Код:
error 029: invalid expression, assumed zero
error 001: expected token: ";", but found "]"
error 001: expected token: ";", but found "["
fatal error 107: too many error messages on one line
Line
Код:
stationidv[GetPlayerVehicleID(playerid)][0] = 0;



Re: Error !! Help ! - Konstantinos - 14.10.2013

How is it declared?

It should be:
pawn Код:
new stationidv[MAX_VEHICLES][a_number_here];