30.12.2010, 17:57
Basicly my MYSQL is mixing up variables. e.g:
Adminlevel 0, money: 500.
After logout: adminlevel 500, money: 0 (and not, nothing changed IG with a command or what so ever)
This happens to all of the variables.
Accounts saving (update)
Account adding:
Everything is good, so says the mysql log (succesfully executed). But still he switches all variables.
MYSQL Log: Creating account:
Re-logging
Voor logging in he takes the variables of the last log out ofc.
Adminlevel 0, money: 500.
After logout: adminlevel 500, money: 0 (and not, nothing changed IG with a command or what so ever)
This happens to all of the variables.
Accounts saving (update)
Код:
format(string,sizeof(string), "UPDATE Accounts SET AdminLevel=%i,Money=%i,Bank=%i,Faction=%i,Rank=%i,HouseKey=%i,BizKey=%i,Skin=%i,Spawn1='%f',Spawn2='%f',Spawn3='%f',Spawn4='%f',Spawn5=%i,Reg=%i,Sex=%i,Wallet=%i,Renting=%i,Products=%i,PhoneNumber=%i,Minutes=%i,Spawn6=%i,Arrested=%i,Prisoned=%i,Jailed=%i,JailTime=%i, \ Cell=%i,Towe=%i,License=%i,Linked=%i,ForumName='%s',ForumPassword='%s',wLicense=%i,Job=%i,Donator=%i,CarParts=%i,PlayingTime=%i,FightingStyle=%i WHERE Name = '%s'", AccountData[playerid][AdminLevel],GetPlayerCash(playerid),AccountData[playerid][Bank], AccountData[playerid][Faction],AccountData[playerid][Rank],AccountData[playerid][HouseKey], AccountData[playerid][BizKey],GetPlayerSkin(playerid),AccountData[playerid][Spawn][0],AccountData[playerid][Spawn][1],AccountData[playerid][Spawn][2],AccountData[playerid][Spawn][3], AccountData[playerid][InteriorSpawn],AccountData[playerid][Reg],AccountData[playerid][Sex],GetPlayerWalletCash(playerid),AccountData[playerid][Renting],AccountData[playerid][Products], AccountData[playerid][PhoneNumber],AccountData[playerid][Minutes],AccountData[playerid][WorldSpawn],AccountData[playerid][Arrested],AccountData[playerid][Prisoned],AccountData[playerid][Jailed], AccountData[playerid][JailTime],AccountData[playerid][Cell],AccountData[playerid][Towe],AccountData[playerid][License], AccountData[playerid][Linked], AccountData[playerid][ForumName], AccountData[playerid][ForumPassword],AccountData[playerid][wLicense],AccountData[playerid][pJob], AccountData[playerid][Donator], AccountData[playerid][CarParts], AccountData[playerid][PlayingTime], AccountData[playerid][FightingStyle],GetUserName(playerid)); mysql_query(string, MYSQL_SAVE_USERS);
Код:
mysql_real_escape_string(password, SQLEscape[Escape][0]); format(string,sizeof(string), "INSERT INTO Accounts (Name, Password, AdminLevel, Money, Bank, Faction, Rank, HouseKey, BizKey, Skin, Spawn1, Spawn2, Spawn3, Spawn4, Spawn5, Reg, Sex, Wallet, Renting, PhoneNumber, Minutes, Cell) VALUES('%s',md5('%s'), 0,500,500,999,999,999,999,101, 1981.7389,-1962.9572,16.6941, 359.3499, 0,0, 300, 500,200,0, 0, 1)", name, SQLEscape[Escape][0]); mysql_query(string);
MYSQL Log: Creating account:
Код:
[21:00:36] CMySQLHandler::ProcessQueryThread(UPDATE Accounts SET AdminLevel=0,Money=500,Bank=500,Faction=500,Rank=999,HouseKey=999,BizKey=999,Skin=101,Spawn1='0.000000',Spawn2='0.000000',Spawn3='0.000000',Spawn4='0.000000',Spawn5=0,Reg=1,Sex=1,Wallet=200,Renting=0,Products=0,PhoneNumber=1,Minutes=999,Spawn6=0,Arrested=0,Prisoned=0,Jailed=0,JailTime=0, Cell=0,Towe=0,License=0,Linked=0,ForumName='',ForumPassword='',wLicense=0,Job=0,Donator=0,CarParts=0,PlayingTime=0,FightingStyle=0 WHERE Name = 'Charles Luton') - Data is getting passed to OnQueryFinish() - (Threadsafe: Yes)
Код:
[21:04:16] CMySQLHandler::ProcessQueryThread(UPDATE Accounts SET AdminLevel=1,Money=0,Bank=400,Faction=500,Rank=500,HouseKey=999,BizKey=999,Skin=101,Spawn1='1975.704589',Spawn2='-1965.959838',Spawn3='15.785546',Spawn4='206.144805',Spawn5=0,Reg=1,Sex=300,Wallet=0,Renting=1,Products=999,PhoneNumber=0,Minutes=999,Spawn6=0,Arrested=0,Prisoned=0,Jailed=0,JailTime=0, Cell=0,Towe=0,License=0,Linked=0,ForumName='',ForumPassword='',wLicense=0,Job=0,Donator=0,CarParts=0,PlayingTime=1,FightingStyle=0 WHERE Name = 'Charles Luton') - Data is getting passed to OnQueryFinish() - (Threadsafe: Yes)