INSERT INTO bugged with float
#1

Hey everybody.
I'm using this one MySQL plugin --> http://forum.sa-mp.com/index.php?topic=79352.0

Here's my code:
Код:
new Float:Pozicija[3];
bInfo[sInfo[KiekBendroviu]][bPavadinimas] = Pavadinimas;
bInfo[sInfo[KiekBendroviu]][Vadybininkas] = Zaidejas;
GetPlayerPos(playerid,Pozicija[0],Pozicija[1],Pozicija[2]);
bInfo[sInfo[KiekBendroviu]][bX] = Pozicija[0];
bInfo[sInfo[KiekBendroviu]][bY] = Pozicija[1];
bInfo[sInfo[KiekBendroviu]][bZ] = Pozicija[2];
bInfo[sInfo[KiekBendroviu]][Darbuotojai] = 1;
sInfo[BendrovesTelefonoNumeris]++;
bInfo[sInfo[KiekBendroviu]][bNumeris] = sInfo[BendrovesTelefonoNumeris];
mysql_real_escape_string(Pavadinimas,Pavadinimas);
format(query,1024,"INSERT INTO bendroves (BendrovesID,bPavadinimas,Vadybininkas) VALUES('%d','%s','%s')",sInfo[KiekBendroviu],bInfo[sInfo[KiekBendroviu]][bPavadinimas],bInfo[sInfo[KiekBendroviu]][Vadybininkas]);
mysql_query(query);
Everything's work, till i insert Float's. Then, it's not inserted to the table.
Where the problem?

Thanks for help.
Reply
#2

%f for float
Reply
#3

Quote:
Originally Posted by Killa_
%f for float
I know that. It's won't work.
Reply
#4

Because you're not using %f. Look again.
Reply
#5

Quote:
Originally Posted by _Jay_
Because you're not using %f. Look again.
In this script no. But before that i have used.
( i deleted that, because i need to test this without position )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)