MYSQL Problem
#1

I got a problem where the account settings, money, cars, guns etc do not save when they leave the server, I cannot find a fix and this is a big problem. Any ideas?

Will drop codes if needed, rep will be added.

Edit;
this is what I have got at the minute;
Код:
(28/9/2016) ErrorID: 1064
(28/9/2016) Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for t
(28/9/2016) Query: UPDATE samp_users SET `Password`='195625701', Level='199', Pos_x='1595.58', Pos_y='-2329.42', Pos_z='13.53',
(28/9/2016) Callback: OnQueryFinish
Reply
#2

Probably you need to increase string. I can't tell more without code.
Reply
#3

What code do you think you'll need?
Reply
#4

Search in your script for this query:
PHP код:
UPDATE samp_users SET `Password
And post the full query
Reply
#5

Код:
format(sql, sizeof(sql), "UPDATE samp_users SET `Password`='%d', Level='%d', Pos_x='%.2f', Pos_y='%.2f', Pos_z='%.2f', RegularRank='%d', UpgradePoints='%d'", PlayerInfo[playerid][pKey], PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z], PlayerInfo[playerid][pRegularRank], PlayerInfo[playerid][gPupgrade]);
Reply
#6

PHP код:
UPDATE `samp_usersSET `Password` = %d, `Level` = %d, `Pos_x` = %.2f, `Pos_y` = %.2f, `Pos_z` = %.2f, `RegularRank` = %d, `UpgradePoints` = %
Should work.
btw if the password for players accounts, save it as string.
Reply
#7

Quote:
Originally Posted by oMa37
Посмотреть сообщение
PHP код:
UPDATE `samp_usersSET `Password` = %d, `Level` = %d, `Pos_x` = %.2f, `Pos_y` = %.2f, `Pos_z` = %.2f, `RegularRank` = %d, `UpgradePoints` = %
Should work.
btw if the password for players accounts, save it as string.
Didn't work
Reply
#8

Removed.
Reply
#9

Um, is that the actual code that saves the player's account on disconnect? If so, you have a major issue not specifying which player to save. The way that code would work is when someone disconnects, everyone in the server will have their stats set to the last player that disconnected.
Reply
#10

Quote:
Originally Posted by Swarn
Посмотреть сообщение
Код:
format(sql, sizeof(sql), "UPDATE samp_users SET `Password`='%d', Level='%d', Pos_x='%.2f', Pos_y='%.2f', Pos_z='%.2f', RegularRank='%d', UpgradePoints='%d'", PlayerInfo[playerid][pKey], PlayerInfo[playerid][pLevel],PlayerInfo[playerid][pPos_x],PlayerInfo[playerid][pPos_y],PlayerInfo[playerid][pPos_z], PlayerInfo[playerid][pRegularRank], PlayerInfo[playerid][gPupgrade]);
What is size of "sql" array? Look for new sql[size].
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)