take this as given:
this, works.
this, doesn't.
values are correct all around.
"p $map", returns Game_Map
"p $map.map_id" , returns @map_id
everything as expected.
MODULE::HASH[$map.map_id]
returns "can't read property map_id of nil"...... and I'm calling $map *countless* other times elsewhere, everywhere! D:<
thoughts?
Code:
class Game_Map
attr_reader :map_id
def setup(id)
@map_id = id
...
$map = self
end
end
def map_id
return id
end
def id
@map_id
end
this, works.
Code:
MODULE::HASH[integer] = val
this, doesn't.
Code:
MODULE::HASH[$map.map_id] = val
values are correct all around.
"p $map", returns Game_Map
"p $map.map_id" , returns @map_id
everything as expected.
MODULE::HASH[$map.map_id]
returns "can't read property map_id of nil"...... and I'm calling $map *countless* other times elsewhere, everywhere! D:<
thoughts?
