Changing value in ds_list from another object

S

Smenkare

Guest
I have ds_list created in one object and im trying to ds_list_replace from another object. Isnt it possible to acces ds_list in one object from another? Code is in key_released in 2nd object.

Push :: Execution Error - Variable Get 100001.exampleList(100000, -2147483648)
at gml_Object_start_KeyReleased_LEFT_1 (line 1) - ds_list_replace(exampleList, 0, 5);
 
You can access a list in another object, but don't forget you have to be referring to that object AND the name of the list as well.

In object 1:

ds_list_replace(object2.exampleList, 0, 5)

etc
 
Top