Sscanf "Warning"
#1

Hi, everybody!
At me is fashions, loading of businesses is fashionable.
It looks as follows:
PHP код:
    new Result:busns sql_query(zConn"SELECT * FROM `business` ORDER BY `id`"QUERY_CACHED);
    
gBusinessCount sql_num_rows(busns);
    for(new 
i;i<gBusinessCount;i++)
    {
        
sql_fetch_row(busns,"|",zRes);
        
sql_next_row(busns);
        
sscanf(zRes,"p<|>e<is[64]iiiiiiiiffffiiiii>iiii",gBusiness[i]);
        
gBusinessArea[i] = CreateDynamicSphere(gBusiness[i][busiX],gBusiness[i][busiY],gBusiness[i][busiZ],1.0);
        
CreateDynamicPickup(19132,1,gBusiness[i][busiX],gBusiness[i][busiY],gBusiness[i][busiZ]);
        
gBusinessText[i] = CreateDynamic3DTextLabel("_",CWHITE,gBusiness[i][busiX],gBusiness[i][busiY],gBusiness[i][busiZ]+1.0,20.0);
        switch(
gBusiness[i][busiMafia])
        {
               case 
F_COLTerra[2]++;
               case 
F_MEXTerra[1]++;
               case 
F_YAKTerra[0]++;
        }
    }
    
sql_free_result(busns); 
At start fashion flood ravine here so:
PHP код:
[01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count.
[
01:41:33sscanf warningFormat specifier does not match parameter count
Problem in line:
PHP код:
sscanf(zRes,"p<|>e<is[64]iiiiiiiiffffiiiii>iiii",gBusiness[i]); 
I need to load the following hitherto:
PHP код:
busiID,
busiName[64],
busiType,
busiBint,
busiOwnerID,
busiSellPrice,
busiBank,
busiPrice,
busiProduct,
busiStatus,
Float:busiX,
Float:busiY,
Float:busiZ,
Float:busiR,
busiOrder,
busiDeliving,
busiDelivingArea,
busiDay,
busiMafia,
busiEnterPrice 
Here so the MySQL database looks:
PHP код:
CREATE TABLE IF NOT EXISTS `business` (
  `
idint(4NOT NULL AUTO_INCREMENT,
  `
namevarchar(64COLLATE cp1251_bin NOT NULL,
  `
typeint(2NOT NULL,
  `
bintint(2NOT NULL,
  `
owneridint(9NOT NULL,
  `
sellpriceint(9NOT NULL,
  `
bankint(11NOT NULL,
  `
priceint(4NOT NULL,
  `
productint(7NOT NULL,
  `
statustinyint(1NOT NULL,
  `
xfloat NOT NULL,
  `
yfloat NOT NULL,
  `
zfloat NOT NULL,
  `
rfloat NOT NULL,
  `
orderint(8NOT NULL DEFAULT '0',
  `
delivingint(8NOT NULL DEFAULT '0',
  `
dayint(30NOT NULL,
  `
mafiaint(11NOT NULL,
  `
enterint(32NOT NULL,
  
PRIMARY KEY (`id`)
ENGINE=MyISAM  DEFAULT CHARSET=cp1251 COLLATE=cp1251_bin AUTO_INCREMENT=
Help me to make correctly please inquiry for "sscanf".
Reply
#2

Not absolutely I understood, not the Englishman, the translator not absolutely correctly forms offers.
The mere verbiage turns out simply.
So it will turn out?
PHP код:
sscanf(zRes,"p<|>e<is[64]iiiffffiiiii>iiii",gBusiness[i]); 
On ideas:
PHP код:
`idint(4NOT NULL AUTO_INCREMENT,                //i
`namevarchar(64COLLATE cp1251_bin NOT NULL,     //str
`typeint(2NOT NULL,                             //i
`bintint(2NOT NULL,                             //i
`owneridint(9NOT NULL,                          //i
`sellpriceint(9NOT NULL,                        //i
`bankint(11NOT NULL,                            //i
`priceint(4NOT NULL,                            //i
`productint(7NOT NULL,                          //i
`statustinyint(1NOT NULL,                       //i
`xfloat NOT NULL,                                    //f
`yfloat NOT NULL,                                    //f
`zfloat NOT NULL,                                    //f
`rfloat NOT NULL,                                    //f
`orderint(8NOT NULL DEFAULT '0',                //i
`delivingint(8NOT NULL DEFAULT '0',             //i
`dayint(30NOT NULL,                             //i
`mafiaint(11NOT NULL,                           //i
`enterint(32NOT NULL,                           //i 
That is inquiry:
PHP код:
sscanf(zRes,"p<|>e<is[64]iiiiiiiiffffiiiii",gBusiness[i]); 
But it doesn't load...
Reply
#3

Close please.
It is solved.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)