SA-MP Forums Archive
Registered plate stock error 'error 076: syntax error in the expression, or invalid function call' - 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: Registered plate stock error 'error 076: syntax error in the expression, or invalid function call' (/showthread.php?tid=354044)



Registered plate stock error 'error 076: syntax error in the expression, or invalid function call' - Deal-or-die - 25.06.2012

This is my error
Code:
(4717) : error 076: syntax error in the expression, or invalid function call
(4731) : error 076: syntax error in the expression, or invalid function call
This is my stock
pawn Code:
stock RegisteredPlate(playerid)
{
    new string[50];
    format(string,sizeof(string),"{000000}%c%c%c-%i%i%i",(65+random(26)),(65+random(26)),(65+random(26)),random(10),random(10),random(10));
    return string;
}
Where I want the stock called.
pawn Code:
if(response)
{
    if(IsPlayerInRangeOfPoint(playerid, 7.0, GrottiSalesPos_X,GrottiSalesPos_Y,GrottiSalesPos_Z))//Grotti Dealership.
    {
        SetVehicleNumberPlate(car, RegisteredPlate);
//---------------^ Row 4717 ^-----------
        format(query,sizeof(query), "INSERT INTO `vehicles`('%d','%s')",VehicleColour[playerid][1],RegisteredPlate);
//---------------^ Row 4731 ^-----------
        mysql_query(query);
        SendClientMessage(playerid, COLOR_GREEN, "Vehicle Purchased");
        return 1;
    }
Ideas?
I know that I am probably going to slap myself later for something blindingly obvious. But I can't see it at the moment hence the reason I am asking.


Re: Registered plate stock error 'error 076: syntax error in the expression, or invalid function call' - ViniBorn - 25.06.2012

pawn Code:
SetVehicleNumberPlate(car, RegisteredPlate(playerid));

format(query,sizeof(query), "INSERT INTO `vehicles`('%d','%s')",VehicleColour[playerid][1],RegisteredPlate(playerid));



Re: Registered plate stock error 'error 076: syntax error in the expression, or invalid function call' - Deal-or-die - 25.06.2012

Would the parameter for that stock be 'playerid'?
I know that I have put it there but just to confirm this.