Registered plate stock error 'error 076: syntax error in the expression, or invalid function call'
#1

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.
Reply
#2

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

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

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


Forum Jump:


Users browsing this thread: 1 Guest(s)