SA-MP Forums Archive
I get unwanted error! :( - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: I get unwanted error! :( (/showthread.php?tid=250683)



I get unwanted error! :( - nuriel8833 - 24.04.2011

Hello guys
I get this error:
PHP Code:
 error 029invalid expressionassumed zero 
For this line:
PHP Code:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == BannedVehicles[]) return SendClientMessage(playerid,COLOR_WARNING,"Warning: You are not allowed to teleport with that vehicle!"); 
And this is the BannedVehicles argument:
PHP Code:
new BannedVehicles[83] =
{
403,406,407,408,414,416,417,423,425,427,428,430,431,432,433,435,437,
 
443,446,447,449,450,452,453,454,455,456,464,464,465,469,472,473,476,
 
484,486,487,488,493,497,498,499,501,508,511,512,513,514,515,519,520,
 
524,525,528,532,537,538,544,548,552,553,563,564,569,570,573,577,578,
 
582,584,588,590,591,592,593,594,595,601,606,607,608,610,611}; 
Could someone help me fix the problem?
Thanks


Re: I get unwanted error! :( - Lorenc_ - 24.04.2011

Use pawn tags next time plz

pawn Code:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == BannedVehicles) return SendClientMessage(playerid,COLOR_WARNING,"Warning: You are not allowed to teleport with that vehicle!");
Try that.


Re: I get unwanted error! :( - nuriel8833 - 24.04.2011

Quote:
Originally Posted by Lorenc_
View Post
Use pawn tags next time plz

pawn Code:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == BannedVehicles) return SendClientMessage(playerid,COLOR_WARNING,"Warning: You are not allowed to teleport with that vehicle!");
Try that.
pawn Code:
C:\Documents and Settings\Liat.LIAT-5FBA01523F\Desktop\pawno\XArena Stunt\XArena Stunts Mode.pwn(1469) : error 033: array must be indexed (variable "BannedVehicles")



Re: I get unwanted error! :( - Lorenc_ - 24.04.2011

pawn Code:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == BannedVehicles[GetPlayerVehicleID(playerid)]) return SendClientMessage(playerid,COLOR_WARNING,"Warning: You are not allowed to teleport with that vehicle!");
Damn sorry about that, try this.


Re: I get unwanted error! :( - nuriel8833 - 24.04.2011

Quote:
Originally Posted by Lorenc_
View Post
pawn Code:
if(GetVehicleModel(GetPlayerVehicleID(playerid)) == BannedVehicles[GetPlayerVehicleID(playerid)]) return SendClientMessage(playerid,COLOR_WARNING,"Warning: You are not allowed to teleport with that vehicle!");
Damn sorry about that, try this.
Don't worry,I also make stupid mistakes every times
Anyway no errors,thank you very much for your help!