Help Please - 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: Help Please (
/showthread.php?tid=314241)
Help Please -
Nuke547 - 29.01.2012
Please help. My errors:
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;
}
}
}
}
Re: Help Please -
trapped1 - 29.01.2012
Код:
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;
}
}
}
return 1;
}
Re: Help Please -
Nuke547 - 29.01.2012
That didnt work
Re: Help Please -
Nuke547 - 29.01.2012
Bump
Re: Help Please -
Nuke547 - 29.01.2012
Please help! Why didnt it work?
Re: Help Please - Guest9328472398472 - 29.01.2012
No need to rape the "Reply" button...
Re: Help Please -
Snowman12 - 29.01.2012
lmfao why the hell do you think your so special that we should give you a reply within 8minutes?? Infact in part you bumped within 5.