You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I removed :precise and ran the code @Tileset = Gosu::TexturePacker.load_json(
self, media_path('ground.json')
)
and it is giving the err
$ ruby 02-warmup/random_map.rb
Traceback (most recent call last):
7: from 02-warmup/random_map.rb:47:in <main>' 6: from 02-warmup/random_map.rb:47:in new'
5: from 02-warmup/random_map.rb:16:in initialize' 4: from /var/lib/gems/2.7.0/gems/gosu_texture_packer-0.1.8/lib/gosu_texture_packer.rb:8:in load_json'
3: from /var/lib/gems/2.7.0/gems/gosu_texture_packer-0.1.8/lib/gosu_texture_packer/tileset.rb:7:in load_json' 2: from /var/lib/gems/2.7.0/gems/gosu_texture_packer-0.1.8/lib/gosu_texture_packer/tileset.rb:7:in new'
1: from /var/lib/gems/2.7.0/gems/gosu_texture_packer-0.1.8/lib/gosu_texture_packer/tileset.rb:12:in initialize' /var/lib/gems/2.7.0/gems/gosu_texture_packer-0.1.8/lib/gosu_texture_packer/tileset.rb:12:in read': no implicit conversion of GameWindow into String (TypeError)
The book was written around 7 years ago, gosu was updated, but book was not. Also https://github.com/spajus/gosu-texture-packer was updated. Unfortunately I no longer support or update the book or the code samples, so the best you can do is figure out what versions of gosu and gosu_texture_packer you are using, get their source code, and figure out how to fix it. Changes should be pretty minimal.
$ruby 02-warmup/random_map.rb
Traceback (most recent call last):
3: from 02-warmup/random_map.rb:47:in
<main>' 2: from 02-warmup/random_map.rb:47:in
new'1: from 02-warmup/random_map.rb:16:in
initialize' /var/lib/gems/2.7.0/gems/gosu_texture_packer-0.1.8/lib/gosu_texture_packer.rb:7:in
load_json': wrong number of arguments (given 3, expected 1..2) (ArgumentError)The text was updated successfully, but these errors were encountered: