Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

tncowart

2
Posts
1
Topics
1
Following
A member registered Apr 20, 2019

Recent community posts

(1 edit)

I also notice that I can use generated accessors from outside the class. Basically, given

class Foo
    attr_accessor :bar
    def initialize
        @bar = 0
    end
    def baz
        bar += 1
    end
end
f = Foo.new

This is fine:

f.bar
f.bar = 1

This crashes the engine with the above error because the 'baz' method uses the 'bar' accessor internally:

f.baz
(1 edit)

What does this mean?

ERROR:
The following hash reached a nil thrashing limit.
Here are the details:
{
  :entity_id => 1,
    :tick_count => 2,
    :__thrash_count__ => {
                         :+ => 6
                       },
    :player => #<Player:0x118b58f60>,
    :obstacles => [[590, 0, 50, 50, 255, 0, 0], [640, 0, 50, 100, 0, 0, 200], [710, 50, 200, 5, 200, 0, 200]]
}
member: [+]
attribute: [obstacles].

I get it when I use "attr_accessor [symbols]" in my Player class and then access my instance variables using the generated accessors.

I get around this by using instance variables directly but it feels weird and un-ruby-ish to do so.

 Is this a limitation of DragonRuby or DragonRuby GTK?

Thank you!