error 033: array must be indexed (variable "cName") - 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: error 033: array must be indexed (variable "cName") (
/showthread.php?tid=374797)
error 033: array must be indexed (variable "cName") -
kiloman3 - 04.09.2012
Hi!, im lost on how to get the vehicles name and display it when spawned like this.
i have tried the following but i have failed.
Код:
new cName[200];
if(carid = 520)*then cName == "Hydra");
format(string, sizeof(string), "You spawned vehicleid %d (%s)", carid, cName);
I have never dealt with this before and i think i'm doing it completely wrong.
Re: error 033: array must be indexed (variable "cName") -
ikey07 - 04.09.2012
if(carid == 520) { cName = "Hydra"); }
or use strmid
Re: error 033: array must be indexed (variable "cName") -
Jakku - 04.09.2012
pawn Код:
new cName[30];
if (carid == 520) format(cName,sizeof(cName),"Hydra");
format(string, sizeof(string), "You spawned vehicleid %d (%s)", carid, cName);
Re: error 033: array must be indexed (variable "cName") -
kiloman3 - 04.09.2012
Thanks! It Works