ID:264754
 
Code:
var/testlist=list()
mob/verb/test_addmob(mob/M in world)
set category="TEST"
testlist[M]=60

mob/verb/test_editlist()
set category="TEST"
for(var/mob/m in world)
if(testlist[m]>0)world<<"[testlist[m]]"
testlist+=40
for(var/mob/M in world)
if(testlist[M]>0) world<<"[testlist[M]]"


Problem description:
testlist can have any length, and each one == a number

I want to be able to change everysingle one of thos values...
in terms of the above snippet: I want the first number outputted to be "60" and I want the 2nd number outputted to be "100" (since 60+40=100)

testlist+=40 is adding the item 40 to the list. All the other items in the list are mobs. This will not add 40 to the associated value of every item in the list.

What you need to do is indent your testlist+=40 line and change it to testlist[m]+=40 instead. That will add 40 to the associated value for each m.

Lummox JR
In response to Lummox JR
Thanks lummox. Simple/logical eh :\ my bad.
I actually just looked it up in reference, ref had the answer staring me in the face with flashing lights and sirens :|
Sorry about the time wasting :)