29.01.2012, 03:32
Please help. My errors:
error 006: must be assigned to an array
Thats my error. I get 3 of them. Help please!
The script:
error 006: must be assigned to an array
Thats my error. I get 3 of them. Help please!
The script:
PHP код:
command(setplate, playerid, params[])
{
new plate, vehslot, string[255];
if(sscanf(params, "ul", plate, vehslot))
{
SendClientMessage(playerid, WHITE, "SYNTAX: /setplate [Plate Name] [Car Slot]");
}
else
{
switch(vehslot)
{
case 1:
{
format(string, sizeof(string), "%s", plate);
SetVehicleNumberPlate(Player[playerid][CarLinkID], string);
Player[playerid][CarPlate] = string;
}
case 2:
{
format(string, sizeof(string), "%s", plate);
SetVehicleNumberPlate(Player[playerid][Car2LinkID], string);
Player[playerid][CarPlate2] = string;
}
case 3:
{
format(string, sizeof(string), "%s", plate);
SetVehicleNumberPlate(Player[playerid][Car3LinkID], string);
Player[playerid][CarPlate3] = string;
}
}
}
}