SA-MP Forums Archive
Loading mysql - 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: Loading mysql (/showthread.php?tid=555070)



Loading mysql - ShoortyFl - 06.01.2015

So i don't know what is going on, in the database it's saved correctly, but when i load it to server letters mess up not showing text correctly

in db:



on server:



This is how i load it

pawn Код:
cache_get_field_content(i, "Adresa", temp);
format(HInfo[i][Adresa], 50, "%s", temp);
and just another question, how can i make label showing above pickup not in it ?


Re: Loading mysql - RedFusion - 06.01.2015

do you save it as a packed string?


Re: Loading mysql - ShoortyFl - 06.01.2015

Just a part of scrip :

pawn Код:
new id = SpawnedHouses+1;
pawn Код:
"INSERT INTO `kuce` (`Adresa`) VALUES ('Commerce %d')", id);



Re: Loading mysql - ShoortyFl - 06.01.2015

anyone ?


Re: Loading mysql - ShoortyFl - 08.01.2015

anyone ?


Re: Loading mysql - Sawalha - 08.01.2015

you don't need to format the destination (HInfo[i][Adresa]) be cause "cache_get_field_content" already does.
pawn Код:
cache_get_field_content(i, "Adresa", HInfo[i][Adresa], /* Your mysql connection , default , it's known as "mysql", */, sizeof(HInfo[i][Adresa]);