SA-MP Forums Archive
ODD Bug - 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: ODD Bug (/showthread.php?tid=280345)



ODD Bug - steki. - 31.08.2011

I don't know why and how, but it seems I ain't in a luck day.

Check it out.

pawn Код:
format( str, 256, "SELECT * FROM vehicleinfo WHERE id=%d AND owner=%d", vehicleInfo[v][vOwner], playerInfo[playerid][pCid] );
As I said, I don't know why does it gives up "LECT * FROM vehicleinfo...".

Any light from the sky? :<


Re: ODD Bug - JaTochNietDan - 31.08.2011

I think you might want to provide more information and explain it, because reading this I really don't know what you mean, I can only make a wild guess from extracting some of your vague explanation, which is, when the query string is formatted it doesn't have the "SEL" part of the string in it?


Re: ODD Bug - steki. - 31.08.2011

Code:
pawn Код:
new str[256];
                        format( str, 256, "SELECT * FROM vehicleinfo WHERE id=%d AND owner=%d", vehicleInfo[v][vOwner], playerInfo[playerid][pCid] );
                        mysql_query( query );
                        mysql_store_result();
                        new n = mysql_num_rows();
                        mysql_free_result();
What I get:





Re: ODD Bug - Pinguinn - 31.08.2011

Nvm, that wasnt the error


Re: ODD Bug - JaTochNietDan - 31.08.2011

That's not showing that the string is missing pieces, it's only highlighting a part of the SQL syntax that is not correct (Indeed it is not very clear in this state, although it is designed to deal with much larger more complex queries). I can't see any problem really with the syntax, although it may be expecting your table name to be enclosed in quotes, for example:

pawn Код:
SELECT * FROM `vehicleinfo` WHERE id = %d AND owner = %d
To prove my point, simply print the query string and you will see that there is nothing missing from it.


Re: ODD Bug - steki. - 31.08.2011

Thanks. I'll figure out what's the actual problem later.