Having an Issue.
#1

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

what for is "%c"
Reply
#3

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

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);
Reply
#5

did you have under your enum for vehicle vVehiclePlate ??
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)