25.12.2013, 03:46
Sorry if this doesn't help but your query logicS seem ...
First query, there is no where. The query will update every account.
Third query, what?
FOR i TO 46 DO
UPDATE `weaponkills` SET `weapon` = '%d', `kills` = '%d' WHERE `id` = '%d'
endfor
UPDATE `weaponkills` SET `weapon` = '0', `kills` = '1000' WHERE `id` = 'Kar'
UPDATE `weaponkills` SET `weapon` = '1', `kills` = '1000' WHERE `id` = 'Kar'
UPDATE `weaponkills` SET `weapon` = '2', `kills` = '1000' WHERE `id` = 'Kar'
UPDATE `weaponkills` SET `weapon` = '3', `kills` = '1000' WHERE `id` = 'Kar'
...
Say what? it 'Looks right' but then again, it's just setting weapon to INDEX and kills to whatever that INDEX'd variable is to Kar.
Lastly...
Say what?
Lastly again,
You haven't really said whats the problem. If it's that the weapon kills isn't being set for EACH weapon, I showed you the issue above.
First query, there is no where. The query will update every account.
Third query, what?
FOR i TO 46 DO
UPDATE `weaponkills` SET `weapon` = '%d', `kills` = '%d' WHERE `id` = '%d'
endfor
UPDATE `weaponkills` SET `weapon` = '0', `kills` = '1000' WHERE `id` = 'Kar'
UPDATE `weaponkills` SET `weapon` = '1', `kills` = '1000' WHERE `id` = 'Kar'
UPDATE `weaponkills` SET `weapon` = '2', `kills` = '1000' WHERE `id` = 'Kar'
UPDATE `weaponkills` SET `weapon` = '3', `kills` = '1000' WHERE `id` = 'Kar'
...
Say what? it 'Looks right' but then again, it's just setting weapon to INDEX and kills to whatever that INDEX'd variable is to Kar.
Lastly...
pawn Code:
forward public SavePlayerData(playerid);
public SavePlayerData(playerid)
Lastly again,
You haven't really said whats the problem. If it's that the weapon kills isn't being set for EACH weapon, I showed you the issue above.