SA-MP Forums Archive
Having an Issue. - 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: Having an Issue. (/showthread.php?tid=305191)



Having an Issue. - Eric - 21.12.2011

Heya' guys.

I'm trying to get a license plate system going, and I'm having issues.
I did it using another vehicle system and it worked fine, and I used almost the exact same lines as I'm about to post.

Can anyone help me out? Thanks!

pawn Код:
new licenseplate[32];
format(licenseplate, sizeof(licenseplate), "%c%c%c %i%i%i%i",(65+random(26)),(65+random(26)),(65+random(26)),random(10),random(10),random(10),random(10));
vehicleVariables[i][vVehiclePlate] = licenseplate; (ERROR IS ON THIS LINE)
Error:

C:\Users\Eric\Desktop\SAMP Server\ET-RP\ET-RP\gamemodes\vx-rp.pwn(17012) : error 006: must be assigned to an array


Re: Having an Issue. - kizla - 21.12.2011

what for is "%c"


Re: Having an Issue. - Eric - 21.12.2011

It's used to generate a random character.
(Atleast I'm pretty sure - I didn't write that, I found it browsing the forums)

I know that all of that works though, I'm using it for a different thing and its working fine and its the exact same line.

Not sure why I'm getting this error.


Re: Having an Issue. - Tee - 21.12.2011

pawn Код:
new licenseplate[32];
format(licenseplate, sizeof(licenseplate), "%c%c%c %i%i%i%i",(65+random(26)),(65+random(26)),(65+random(26)),random(10),random(10),random(10),random(10));
format(vehicleVariables[i][vVehiclePlate],32,"%s",licenseplate);



Re: Having an Issue. - kizla - 21.12.2011

did you have under your enum for vehicle vVehiclePlate ??


Re: Having an Issue. - Eric - 21.12.2011

Quote:
Originally Posted by Tee
Посмотреть сообщение
pawn Код:
new licenseplate[32];
format(licenseplate, sizeof(licenseplate), "%c%c%c %i%i%i%i",(65+random(26)),(65+random(26)),(65+random(26)),random(10),random(10),random(10),random(10));
format(vehicleVariables[i][vVehiclePlate],32,"%s",licenseplate);
Works like a charm.

Thanks!

Rep+