[help] error 033: array must be indexed (variable "IsDriver")
#1

I got this error:

pawn Код:
913:  error 033: array must be indexed (variable "IsDriver")
line 913:

pawn Код:
public OnPlayerExitVehicle(playerid, vehicleid)
  {
    if (IsDriver)     // <-----------line 913
    {
    new currentveh;
    currentveh = GetPlayerVehicleID(playerid);
    DestroyVehicle(currentveh);
    IsDriver[playerid]=false;
    }
}
so who can help me fix this?
Reply
#2

You have the variable called IsDriver?
Reply
#3

You can't check if a player is the driver of the car in the OnPlayerExitVehicle(playerid, vehicleid) statement!
Reply
#4

i got this above my script:

pawn Код:
new bool:IsDriver[MAX_PLAYERS] = false;
i'm newbie in pawn :/
Reply
#5

So you want that when a player exits a vehicle, his vehicle to disappear?
Reply
#6

Yes... well not equal but in 30 seconds or something like that
Reply
#7

Set a timer for a function and check this https://sampwiki.blast.hk/wiki/OnPlayerStateChange
Reply
#8

Okay should try it, Thanks for help +rep!
Reply
#9

i am a beginner too, tried to script this but i didnt make it, sorry.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)