SA-MP Forums Archive
MySQL Insert Error - 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: MySQL Insert Error (/showthread.php?tid=657658)



MySQL Insert Error - IdonTmiss - 12.08.2018

I have a problem with this bit of code, so if anybody can help me, please do so

PHP код:
    new q[500];
    
mysql_format(MyHandleqsizeof q"INSERT INTO `table_3` (`type`, `shiet`, `fact`, `price`, `level`, `owner`, `enterx`, `entery`, `enterz`, `cash`, `isthere`) \
        VALUES (%d, %d, %d, %d, %d, %d, %f, %f, %f, %d, %d)"
,
        
BI[bizid][bType],
        
BI[bizid][bSheit],
        
BI[bizid][bFact],
        
BI[bizid][bPrice],
        
BI[bizid][bLevel],
        
BI[bizid][bOwner],
        
BI[bizid][bEnterX],
        
BI[bizid][bEnterY],
        
BI[bizid][bEnterZ],
        
BI[bizid][bCash],
        
BI[bizid][bIsThere]
    );
    
mysql_pquery(MyHandleq"OnBizCreate""businessid"bizid); // THIS LINE 
PHP код:
forward OnBizCreate(businessid);
public 
OnBizCreate(businessid)
{
    
BI[businessid][bSqlID] = cache_insert_id();
    return 
1;

pawn Код:
[plugins/mysql] mysql_pquery: callback error: parameter count does not match format specifier length
EDIT: bizid loops for the next address ( BIZ ADDRESS ) on the server


Re: MySQL Insert Error - Banditul18 - 12.08.2018

You missed the '%s' in the values for owner


Re: MySQL Insert Error - IdonTmiss - 12.08.2018

Quote:
Originally Posted by Banditul18
Посмотреть сообщение
You missed the '%s' in the values for owner
It's not owner's name but if there is/isn't an owner like true/false


Re: MySQL Insert Error - IdonTmiss - 13.08.2018

fixed..