[Mysql] Error ID: 1064 (L Considered as [])
#1

Using translate.******.ru as the British do not know much! in the general problem

log
Quote:

[02:03:52] CMySQLHandler::Query(UPDATE `house` SET EnterX=-329.548034,EnterY=-329.548034,EnterZ=-329.548034,ExitX=2350.339843,ExitY=-1181.649902,ExitZ=1027.976562,Owner=Sa[]e,Owned=97,Price=101,Inter=5 WHERE id='1') - An error has occured. (Error ID: 1064, You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '[]e,Owned=97,Price=101,Inter=5 WHERE id='1'' at line 1)

code
PHP Code:
strmid(HouseInfo[home][hOwner], pname0strlen(pname), 255); 
PHP Code:
stock HouseUpdate(idx)
{
    new 
src[MAX_STRING],query[MAX_QUERY];
    
format(query,sizeof(query),"UPDATE `"HouseTable"` SET ");
    
format(src,sizeof(src),"EnterX=%f,",HouseInfo[idx][hEnterX]);
    
strcat(query,src,sizeof(query));
    
format(src,sizeof(src),"EnterY=%f,",HouseInfo[idx][hEnterY]);
    
strcat(query,src,sizeof(query));
    
format(src,sizeof(src),"EnterZ=%f,",HouseInfo[idx][hEnterZ]);
    
strcat(query,src,sizeof(query));
    
format(src,sizeof(src),"ExitX=%f,",HouseInfo[idx][hExitX]);
    
strcat(query,src,sizeof(query));
    
format(src,sizeof(src),"ExitY=%f,",HouseInfo[idx][hExitY]);
    
strcat(query,src,sizeof(query));
    
format(src,sizeof(src),"ExitZ=%f,",HouseInfo[idx][hExitZ]);
    
strcat(query,src,sizeof(query));
    
format(src,sizeof(src),"Owner=%s,",HouseInfo[idx][hOwner]);
    
strcat(query,src,sizeof(query));
    
format(src,sizeof(src),"Owned=%d,",HouseInfo[idx][hOwned]);
    
strcat(query,src,sizeof(query));
    
format(src,sizeof(src),"Price=%d,",HouseInfo[idx][hPrice]);
    
strcat(query,src,sizeof(query));
    
format(src,sizeof(src),"Inter=%d",HouseInfo[idx][hInt]);
    
strcat(query,src,sizeof(query));
    
format(src,sizeof(src)," WHERE id='%d'",idx);
    
strcat(query,src,sizeof(query));
    
mysql_query(query);
    return 
1;

Here's a character turns on the screenshot
http://s010.radikal.ru/i312/1109/af/2a152c7fed78.bmp
encoding utf8
Reply
#2

pawn Code:
format(src,sizeof(src),"Owner='%s',",HouseInfo[idx][hOwner]);
Reply
#3

Thank you! but the main problem remains
Instead of [GL] iDeep, he sohronyaet [G] iDeep
Why he does not see the L?
Reply
#4

Plase Help
Reply
#5

Put `` around the fieldnames. mySQL has it's own functions and can't tell the difference between a field name and a function.
Reply
#6

I already knew =) but it still does not write the L, why he does not see it?
Reply
#7

Heeelp! )
Reply
#8

So here is the whole team that it's wrong?
PHP Code:
if(dialogid == 22)
    {
        if(
response)
        {
            new 
Float:oldposxFloat:oldposyFloat:oldposz;
            new 
Float:x,Float:y,Float:z;
            
GetPlayerPos(playerid,x,y,z);
            new 
playername[MAX_PLAYER_NAME];
            
GetPlayerName(playeridplayernamesizeof(playername));
            
GetPlayerPos(playeridoldposxoldposyoldposz);
    for(new 
home 1home MAX_HOUSEhome++)
    {
        if (
PlayerToPoint(2playerid,HouseInfo[home][hEnterX],HouseInfo[home][hEnterY],HouseInfo[home][hEnterZ]))
        {
                    if(
GetPVarInt(playerid,"House") != 0)
                    {
                        
SendClientMessage(playeridCOLOR_WHITE"   У вас уже есть дом, продайте его через меню >> дома >> продать");
                        return 
1;
                    }
                    if(
GetPlayerMoney(playerid) > HouseInfo[home][hPrice])
                    {
                        new 
plname[MAX_PLAYER_NAME],sql[256],string[256];
                            
GetPlayerName(playerid,plname,sizeof(plname));
                        
GivePlayerMoney(playerid,-HouseInfo[home][hPrice]);
                        
SetPVarInt(playerid,"House",home);
                        
SetPVarInt(playerid,"Int",HouseInfo[home][hInt]);
                        
SetPVarInt(playerid,"Local",HouseInfo[home][hInt]);
                        
SendClientMessage(playeridCOLOR_WHITE"Поздравляем, с покупкой дома !");
                        
SendClientMessage(playeridCOLOR_WHITE"Используйте /help чтобы посмотреть команды для дома !");
                        
SendClientMessage(playeridCOLOR_WHITE"Используйте C(кнопка присесть) что бы войти в дом !");
                        
HouseInfo[home][hId] = home// для цифр
                           
HouseInfo[home][hEnterX] = x;
                        
HouseInfo[home][hEnterY] = y;
                        
HouseInfo[home][hEnterZ] = z;
                        
HouseInfo[home][hExitX] = 2350.33984;
                             
HouseInfo[home][hExitY] = -1181.64990;
                          
HouseInfo[home][hExitZ] = 1027.97656;
                          
HouseInfo[home][hOwned] = 1;
                           
strmid(HouseInfo[home][hOwner], plname0sizeof(plname)*4sizeof(plname)*4);
                        
HouseInfo[home][hInt] = 5;
                        
HouseInfo[home][hPrice] = HouseInfo[home][hPrice];
                          
format(sql256"UPDATE `"HouseTable"` SET EnterX='%f',EnterY='%f',EnterZ='%f',ExitX='%f',ExitY='%f',ExitZ='%f',Owner='%s',Owned='%d',Price='%d',Inter='%d' WHERE id=%d",
                          
HouseInfo[home][hEnterX],
                           
HouseInfo[home][hEnterY],
                          
HouseInfo[home][hEnterZ],
                            
HouseInfo[home][hExitX],
                          
HouseInfo[home][hExitY],
                          
HouseInfo[home][hExitZ],
                          
HouseInfo[home][hOwner],
                          
plname,
                          
HouseInfo[home][hPrice],
                          
HouseInfo[home][hInt],
                          
home );
                          
mysql_query(sql);
                        
MySQL_Player_Update(playerid);
                        return 
1;
                    }
                    else
                    {
                        
SendClientMessage(playeridCOLOR_WHITE"   У вас нет столько денег !");
                        return 
1;
                    }
                }
            }
            }
            else
            {
            return 
1;
            }
        } 
Even in the game does not show the L
Reply
#9

Help блять!
Reply
#10

Don't you have to set the charset for those languages? See the topic for the plugin.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)