Problem with mysql pos saving... :(
#6

Make sure you change the tablename...
Also, I think Sascha's version should work without the ")" at the end, delete it, so it will look like:
pawn Код:
format(pos, sizeof(pos), "UPDATE `TABLENAME` SET `Position` = '%f, %f, %f' WHERE `Name`='%s'", pos1, pos2, pos3, name)
If not, create more fields, with: posX, posY, posZ
So:
pawn Код:
format( pos, sizeof pos, "UPDATE `TABLENAME` SET `posX` = '%f', `posY` = '%f', `posZ` = '%f'  WHERE `Name` = '%s'", pos1, pos2, pos3, name )
Also, check if the pos is already saved, if not, you need to use INSERT INTO.

And make sure you do GetPlayerPos( playerid, pos1, pos2, pos3 ); and then format the query.

EDIT: Also a 64 cell string isn't enough for this query... You need approx 140 cell string for this.
So change
pawn Код:
new pos[64],pName[MAX_PLAYER_NAME];
to
pawn Код:
new pos[ 140 ], pName[ MAX_PLAYER_NAME ];
Reply


Messages In This Thread
Problem with mysql pos saving... :( - by Vvolk - 11.05.2011, 10:57
Re: Problem with mysql pos saving... :( - by Sascha - 11.05.2011, 11:22
Re: Problem with mysql pos saving... :( - by Vvolk - 11.05.2011, 11:54
Re: Problem with mysql pos saving... :( - by black_dota - 11.05.2011, 12:17
Re: Problem with mysql pos saving... :( - by Vvolk - 11.05.2011, 18:54
Re: Problem with mysql pos saving... :( - by Mean - 11.05.2011, 19:00

Forum Jump:


Users browsing this thread: 1 Guest(s)