Houses dosen´t insert into mysql
#2

pawn Code:
mysql_format(SQL, query, sizeof(query), "INSERT INTO `houses` (`EnterX`, `EnterY`, `EnterZ`, `Price`) VALUES ('%f', '%f', '%f', '%d')", "x, y, z, price");
this should be:

pawn Code:
mysql_format(SQL, query, sizeof(query), "INSERT INTO `houses` (`Entrancex`, `Entrancey`, `Entrancez`, `Prices`) VALUES ('%f', '%f', '%f', '%d')", pX, pY, pZ, price);
You also need to get the player's position before that line and store the position inside variables pX, pY, pZ, or else the query will simply save into the database 3 0.0 floats in the columns for positions.

Also, you need to create the "price" variable because you don't.

I would advise you to try to understand your code, and avoid combining codes from multiple sources into one.
Reply


Messages In This Thread
Houses dosen´t insert into mysql - by Mondialw98 - 09.04.2019, 12:45
Re: Houses dosenґt insert into mysql - by CONTROLA - 09.04.2019, 13:52
Re: Houses dosen´t insert into mysql - by Mondialw98 - 09.04.2019, 21:10
Re: Houses dosen´t insert into mysql - by Heress - 09.04.2019, 21:16
Re: Houses dosen´t insert into mysql - by Mondialw98 - 09.04.2019, 21:57
Re: Houses dosenґt insert into mysql - by solstice_ - 09.04.2019, 22:05

Forum Jump:


Users browsing this thread: 1 Guest(s)