13.02.2014, 17:56
hello, i'm trying to create a new ini file with this commands :
but the gm doesn't create the file.
and gaves that error
but the gm doesn't create the file.
Код:
#define PATH2 "Veicoli/%s.ini"
Код:
stock VehiclePath(vehicleid) { new string[128],vname[MAX_VEHICLE_NAME]; GetVehicleModel(vehicleid,vname,sizeof(vname)); format(string,sizeof(string),PATH2,vname); return string; }
Код:
CMD:veh(playerid, params[]) { new vehid; if(sscanf(params, "i", vehid)) SendClientMessage(playerid, COLOR_GREY, "SYNTAX: /veh <carid>"); else if (vehid < 400 || vehid > 611) SendClientMessage(playerid, COLOR_GREY, "[ERROR] Invalid car id! [ Car ID's range from 400 - 611 ]"); else { new Float:x, Float:y, Float:z; GetPlayerPos(playerid, x, y, z); CreateVehicle(vehid, x + 3, y, z, 0, 0,0, -1); SendClientMessage(playerid, COLOR_GREEN, "Car spawned at your location!"); new INI:File = INI_Open(VehiclePath(vehid)); INI_SetTag(File,"vehicle"); INI_WriteInt(File,"model",VehicleInfo[vehid][vModel]); INI_Close(File); } return 1; }
Код:
C:\Users\User\Desktop\server 2\gamemodes\rp.pwn(972) : warning 202: number of arguments does not match definition C:\Users\User\Desktop\server 2\gamemodes\rp.pwn(972) : warning 202: number of arguments does not match definition