Businesses not saving - 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: Businesses not saving (
/showthread.php?tid=497895)
Businesses not saving -
Mattakil - 01.03.2014
I'm usually pretty good with sql, and can usually debug, but I copy + paste this from another system of mine and it's not inserting into the database.
SAMP LOG
Код:
INSERT INTO `BUSINESSES` (`ADDRESS`, `NAME`, `EXTX`, `EXTY`, `EXTZ`, `VW`, `TYPE`) VALUES(1, 'Null', -1973.634399, 122.965797, 27.694049, 3001, 1)
SCRIPT
pawn Код:
format(Query, sizeof(Query), "INSERT INTO `BUSINESSES` (`ADDRESS`, `NAME`, `EXTX`, `EXTY`, `EXTZ`, `VW`, `TYPE`) VALUES(%d, '%s', %f, %f, %f, %d, %d)", id, str, BusinessInfo[id][bextX], BusinessInfo[id][bextY], BusinessInfo[id][bextZ], BusinessInfo[id][bVW], type);
new name[100];
GetBusinessCommands(id, name);
format(string, sizeof(string), "%New Biz\nAddress: %d\n%s", id, name);
BusinessInfo[id][bLabel] = Create3DTextLabel(string, COLYELLOW, X, Y, Z, 20.0, 0, 1);
db_query(gamemode, Query);
print(Query);
It's probably something silly like an extra variable, however im tired af and cant think straight :S
Re: Businesses not saving -
Mattakil - 01.03.2014
Thought i'd check the DB permissions, were set to 600, fixed that and it works now
How embarrassing :S