SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 25/06/2012, 02:04 PM   #1
Deal-or-die
Huge Clucker
 
Deal-or-die's Avatar
 
Join Date: Oct 2010
Location: An Island 1000's of miles away
Posts: 366
Reputation: 22
Question Registered plate stock error 'error 076: syntax error in the expression, or invalid function call'

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.
__________________
/////////////////////////// | Mini Moot | \\\\\\\\\\\\\\\\\\\\\\\\\\\

"I'm in the country that basically invented the Internet, and your getting faster speeds on an island 1,000miles away"

Last edited by Deal-or-die; 25/06/2012 at 03:00 PM.
Deal-or-die is offline   Reply With Quote
Old 25/06/2012, 03:09 PM   #2
ViniBorn
Godfather
 
ViniBorn's Avatar
 
Join Date: Aug 2010
Location: Brasília
Posts: 5,315
Reputation: 720
Default Re: Registered plate stock error 'error 076: syntax error in the expression, or invalid function call'

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

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



CONTATO: F A C E B O O K: @vinibornpawn

ViniBorn is offline   Reply With Quote
Old 25/06/2012, 03:12 PM   #3
Deal-or-die
Huge Clucker
 
Deal-or-die's Avatar
 
Join Date: Oct 2010
Location: An Island 1000's of miles away
Posts: 366
Reputation: 22
Default Re: Registered plate stock error 'error 076: syntax error in the expression, or invalid function call'

Would the parameter for that stock be 'playerid'?
I know that I have put it there but just to confirm this.
__________________
/////////////////////////// | Mini Moot | \\\\\\\\\\\\\\\\\\\\\\\\\\\

"I'm in the country that basically invented the Internet, and your getting faster speeds on an island 1,000miles away"
Deal-or-die is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[FilterScript] FS:Plate - Plate System Marricio Filterscripts 50 30/07/2013 10:22 PM
[AJUDA] Stock stock GetVehicleModelID(nome[]) Baigou Português/Portuguese 1 08/11/2011 11:21 PM
Registered member? Ironboy Help Archive 5 10/07/2011 02:48 PM
Doesn't read if registered 0ne Help Archive 2 27/10/2009 10:55 AM
Forum date registered bug? someone registered in the year 1969? WackoX Everything and Nothing 20 09/01/2009 08:02 PM


All times are GMT. The time now is 03:04 AM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.