SA-MP Forums Archive
BlueG's mysql problem - 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: BlueG's mysql problem (/showthread.php?tid=523474)



BlueG's mysql problem - LocMax - 02.07.2014

Basically, the owner's name isn't being formatted, it's empty..

pawn Код:
cache_get_field_content(i, "owner", VehicleInfo[vid][vOwner], 21), printf("%s", VehicleInfo[vid][vOwner]);
In console it doesn't write the name, only empty space.

Same problem in house loading..

pawn Код:
cache_get_field_content(i, "name", HouseInfo[hid][Name], 21), printf("%s", HouseInfo[hid][Name]);
            cache_get_field_content(i, "owner", HouseInfo[hid][Owner], 21), printf("%s", HouseInfo[hid][Owner]);
Why is it happening?


Re: BlueG's mysql problem - Konstantinos - 02.07.2014

Its parameters:
pawn Код:
(row, const field_name[], destination[], connectionHandle = 1, max_len = sizeof(destination))
The "21" you passed as argument is supposed to be the max length and not the connection handle.


Re: BlueG's mysql problem - LocMax - 02.07.2014

Alright, thanks, it's fixed...
Also, the "Number of vehicle models: %d" in console, it always appears as 0 even tho I have some vehicles added with AddStaticVehicle, is it something to worry about or?


Re: BlueG's mysql problem - Vince - 02.07.2014

The message appears when OnGameModeInit is done executing. If you create vehicles after that (like with threaded queries) then those won't be counted.