SA-MP Forums Archive
[HELP] error 033: array must be indexed (variable "VfModel") - 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 "VfModel") (/showthread.php?tid=662036)



[HELP] error 033: array must be indexed (variable "VfModel") - DarkOnax - 22.12.2018

Good night Guys i have this error :/


Код:
Gasolina.pwn(481) : error 033: array must be indexed (variable "VfModel")
Gasolina.pwn(484) : error 033: array must be indexed (variable "VfModel")
Gasolina.pwn(487) : error 033: array must be indexed (variable "VfModel")
Gasolina.pwn(490) : error 033: array must be indexed (variable "VfModel")
Gasolina.pwn(493) : error 033: array must be indexed (variable "VfModel")
Gasolina.pwn(496) : error 033: array must be indexed (variable "VfModel")
Gasolina.pwn(506) : error 033: array must be indexed (variable "VfModel")
Gasolina.pwn(509) : error 033: array must be indexed (variable "VfModel")
Gasolina.pwn(512) : error 033: array must be indexed (variable "VfModel")
Gasolina.pwn(515) : error 033: array must be indexed (variable "VfModel")
Gasolina.pwn(518) : error 033: array must be indexed (variable "VfModel")
Gasolina.pwn(521) : error 033: array must be indexed (variable "VfModel")



In top i have

Код:
new VfModel[128];
THE LINE CODE START AT 478 finish at 525

Код:
stock VerificarTipodeG()
{
 new t[128];
 if(VfModel == "Esportivo"){
    t = "Gasolina";
 }
 if(VfModel == "Comum"){
    t = "GNV";
 } 
 if(VfModel == "OffRoad"){
    t = "Gasolina";
 }
 if(VfModel == "Motocicleta"){
    t = "Gasolina";
 } 
 if(VfModel == "Caminhao"){
    t = "Diesel";
 }
 if(VfModel == "Aeronave"){
    t = "AVGas";
 }
 Vftgas = t;
 return;
}

stock VerificarPotencia()
{

if(VfModel == "Esportivo"){
  VfPoten = 3;
}
if(VfModel == "Comum"){
  VfPoten = 1;
}
if(VfModel == "OffRoad"){
  VfPoten = 3;
}
if(VfModel == "Motocicleta"){
  VfPoten = 1;
}
if(VfModel == "Caminhao"){
  VfPoten = 6;
}
if(VfModel == "Aeronave"){
  VfPoten = 12;
}
return;  
}



Re: [HELP] error 033: array must be indexed (variable "VfModel") - Jefff - 22.12.2018

https://sampwiki.blast.hk/wiki/Strcmp


Re: [HELP] error 033: array must be indexed (variable "VfModel") - DarkOnax - 22.12.2018

Niceeee it's WORKED