I get unwanted error! :(
#1

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
Reply
#2

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.
Reply
#3

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")
Reply
#4

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.
Reply
#5

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!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)