Hello, i have been trying to modify a script i have on my gamemode to change the license plates from LS-(Vehicleid) to random numbers and letters (ex: 1asd123 like california kind of thing) but i came across a wall i cant get around.
When a vehicle is purchased is saved into a config file using an enum, thing is i cant add an string into that thing because error 006.
Here is the partial code.
#####
enum vInfo
{
vID,
vLicensePlate,
......
#########
↓ down here is part of the code from the stock() when you buy a vehicle.
###############################
//define lic random
new numberplate[12];
format(numberplate, sizeof(numberplate), "%c%c%c%c%c%c%c", RandomEx('1','9'), RandomEx('A','Z'), RandomEx('A','Z'), RandomEx('A','Z'), RandomEx('1','9'), RandomEx('1','9'), RandomEx('1','9'));
//define lic random
i_Vehicle[vid][vLicensePlate] = numberplate;
############################################# ################
i know "numberplate" alone there isnt enough i have 2 do something else but i cant figure it out, i tried adding " ", also tried making a stock but everything ends with an error of "error 006: must be assigned to an array" i get it, thats not an array but i cant come with another way to save the info in the same file.
if anyone has an idea and wants to share it, i would appreciate it, thanks in advance.
Last edited by sebu; 10-01-2022 at 11:37.
Reason: fixed
|