[help] error 033: array must be indexed (variable "IsDriver") - 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: [help] error 033: array must be indexed (variable "IsDriver") (
/showthread.php?tid=428171)
[help] error 033: array must be indexed (variable "IsDriver") -
Lorenzosdm - 04.04.2013
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?
Re: [help] error 033: array must be indexed (variable "IsDriver") -
iJumbo - 04.04.2013
You have the variable called IsDriver?
Re: [help] error 033: array must be indexed (variable "IsDriver") -
HurtLocker - 04.04.2013
You can't check if a player is the driver of the car in the OnPlayerExitVehicle(playerid, vehicleid) statement!
Re: [help] error 033: array must be indexed (variable "IsDriver") -
Lorenzosdm - 04.04.2013
i got this above my script:
pawn Код:
new bool:IsDriver[MAX_PLAYERS] = false;
i'm newbie in pawn :/
Re: [help] error 033: array must be indexed (variable "IsDriver") -
HurtLocker - 04.04.2013
So you want that when a player exits a vehicle, his vehicle to disappear?
Re: [help] error 033: array must be indexed (variable "IsDriver") -
Lorenzosdm - 04.04.2013
Yes... well not equal but in 30 seconds or something like that
Re: [help] error 033: array must be indexed (variable "IsDriver") -
iJumbo - 04.04.2013
Set a timer for a function and check this
https://sampwiki.blast.hk/wiki/OnPlayerStateChange
Re: [help] error 033: array must be indexed (variable "IsDriver") -
Lorenzosdm - 04.04.2013
Okay should try it, Thanks for help +rep!
Re: [help] error 033: array must be indexed (variable "IsDriver") -
HurtLocker - 04.04.2013
i am a beginner too, tried to script this but i didnt make it, sorry.