Help with eror 033
#1

hello guys.. i get this eror :

Код:
E:\Server\GTA SA\SAMP\Dedicated Server\next\gamemodes\ok.pwn(21835) : error 033: array must be indexed (variable "CurrentSpawnedVehicle")
On line 21835 :
pawn Код:
if(PlayerInfo[CurrentSpawnedVehicle][playerid]!=vehicleid)
And on CurrentSpawnedVehicle :
pawn Код:
new CurrentSpawnedVehicle[MAX_PLAYERS];
//and
CurrentSpawnedVehicle[playerid] = CreateVehicle(modelid, posX, posY, posZ+2, angle, Colour1, Colour2, respawn_delay);
An on vehicleid :
pawn Код:
new vehicleid=GetPlayerVehicleID(playerid);
if(vehicleid!=INVALID_VEHICLE_ID && StateDriver[playerid] && GetVehicleModel(vehicleid)==WantedVehicle)
i want make if player in vehicle CurrentSpawnedVehicle..
Reply
#2

Код:
if(PlayerInfo[CurrentSpawnedVehicle][playerid]!=vehicleid)
should be
Код:
if(PlayerInfo[CurrentSpawnedVehicle[playerid]][playerid]!=vehicleid)
Reply
#3

Quote:
Originally Posted by king_hual
Посмотреть сообщение
Код:
if(PlayerInfo[CurrentSpawnedVehicle][playerid]!=vehicleid)
should be
Код:
if(PlayerInfo[CurrentSpawnedVehicle[playerid]][playerid]!=vehicleid)
i get this warning :

Код:
E:\Server\GTA SA\SAMP\Dedicated Server\next\gamemodes\Ok.pwn(21835) : warning 213: tag mismatch
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
Reply
#4

Is there any particular reason that you are using a global variable within an enumeration? Choose one or the other, but there is no sense in using both.
pawn Код:
if(CurrentSpawnedVehicle[playerid] != vehicleid)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)