SA-MP Forums Archive
Array Problem - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Array Problem (/showthread.php?tid=635870)



Array Problem - justice96 - 15.06.2017

a question.

look at left arrow that I marked, I set weapon unit to 10


in the field of weaponid3_unit is 10, it's correct. but why in other field is filled with random number?


I purchased a DE in line 3 and it successfully inserted with the right field weaponid3_unit


and the question is why in other field besides weaponid3_unit is filled with random number? the value of weaponid3_unit is correct


Re: Array Problem - JessThompson - 15.06.2017

You are only selecting one listitem when using the dialog so it will only change that list item?


Re: Array Problem - justice96 - 15.06.2017

yes, I am only selecting one list item and it will change that field weaponid3 and weaponid3_unit

here are my debug and the result is correct:
Code:
[15/06/2017 17:58:26] [DEBUG] GunUnit[playerid][WeaponsPurchased][listitem] = 1
[15/06/2017 17:58:26] [DEBUG] weaponid3
[15/06/2017 17:58:26] [DEBUG] GunUnit[playerid][Unit][listitem] = 10
[15/06/2017 17:58:26] [DEBUG] weaponid3_unit
but why in other field besides weaponid3_unit is filled with random number?


Re: Array Problem - justice96 - 17.06.2017

bump.


Re: Array Problem - CheezIt - 17.06.2017

Only UPDATE the field being modified... Simple as that, you shouldn't have problems.