Problems saving weapons and ammunition in MySQL
#3

Quote:
Originally Posted by FaLLenGirL
Посмотреть сообщение
Uhm, lol i don't really understand something. You want to update the table where the weapons will be saved right ? So.. why you don't use something like this:

PHP код:
new string1000 ];
mysql_formatg_SQLstringsizeof( string ), "UPDATE `PlayersWeapons` SET `WeaponID` = '%d', `Ammo` = '%d' WHERE `PlayerID` = '%s'"Playerplayerid ][ Weapon ], Playerplayerid ][ Ammo ], Playerplayerid ][ Name ] );
mysql_tqueryg_SQLstring"""" ); 
Also, why you use "Player[ playerid ][ Name ]" to get the player id ? I think that variable stores the player name not the id, the id of a player can be simply found if you use "playerid" that's all. I think it will work in the way i made it. If is not working tell me.

EDIT:
Now i get it, you defined the "PlayerName" in the database like "PlayerID" that's really confusing, why you not just use `Name` or something to be more clear for you.

I have these logs, but nothing goes for MySQL
Код:
[17:07:50] [INFO] query "UPDATE `PlayersWeapon` SET `WeaponID` = '24', `Ammo` = '32766' WHERE `PlayerID` = 'Jnn_Doug'" successfully executed within 0.310 milliseconds
[17:07:50] [DEBUG] CResultSet::Create(connection=0x6248e0, query_str='UPDATE `PlayersWeapon` SET `WeaponID` = '24', `Ammo` = '32766' WHERE `PlayerID` = 'Jnn_Doug'')
[17:07:50] [DEBUG] created new resultset '0x67efd0'
[17:07:50] [DEBUG] fetched MySQL result '0x0'
Reply


Messages In This Thread
Problems saving weapons and ammunition in MySQL - by JnniorDoug - 02.03.2018, 17:58
Re: Problems saving weapons and ammunition in MySQL - by FaLLenGirL - 02.03.2018, 18:15
Re: Problems saving weapons and ammunition in MySQL - by JnniorDoug - 02.03.2018, 19:15

Forum Jump:


Users browsing this thread: 1 Guest(s)