ryanb / ruby-warrior

Game written in Ruby for learning Ruby.
MIT License
3.83k stars 838 forks source link

Cant enter Intermediate Level 6 #24

Closed ruanwz closed 14 years ago

ruanwz commented 14 years ago

When I finished the Intermediate Level 5, it can't enter to Level 6. Here is the log:

- turn 51 -
 -----
|     |
| >@  |
 -----

"current_state: walk"
"current_health: 17"
Yuyan walks backward
Success! You have found the stairs.
Level Score: 68
Time Bonus: 0
Clear Bonus: 14
Total Score: 201 + 82 = 283
Would you like to continue on to the next level? [yn] y
/localdisk/data/ruby/lib/ruby/gems/1.8/gems/rubywarrior-0.1.1/lib/ruby_warrior/level.rb:31:in `load_level': undefined method `time=' for # (NoMethodError)
        from /localdisk/data/ruby/lib/ruby/gems/1.8/gems/rubywarrior-0.1.1/lib/ruby_warrior/level_loader.rb:41:in `unit'
        from (eval):20:in `load_level'
        from /localdisk/data/ruby/lib/ruby/gems/1.8/gems/rubywarrior-0.1.1/lib/ruby_warrior/level.rb:40:in `generate_player_files'
        from /localdisk/data/ruby/lib/ruby/gems/1.8/gems/rubywarrior-0.1.1/lib/ruby_warrior/game.rb:111:in `prepare_next_level'
        from /localdisk/data/ruby/lib/ruby/gems/1.8/gems/rubywarrior-0.1.1/lib/ruby_warrior/game.rb:99:in `request_next_level'
        from /localdisk/data/ruby/lib/ruby/gems/1.8/gems/rubywarrior-0.1.1/lib/ruby_warrior/game.rb:84:in `play_current_level'
        from /localdisk/data/ruby/lib/ruby/gems/1.8/gems/rubywarrior-0.1.1/lib/ruby_warrior/game.rb:63:in `play_normal_mode'
        from /localdisk/data/ruby/lib/ruby/gems/1.8/gems/rubywarrior-0.1.1/lib/ruby_warrior/game.rb:23:in `start'
        from /localdisk/data/ruby/lib/ruby/gems/1.8/gems/rubywarrior-0.1.1/lib/ruby_warrior/runner.rb:17:in `run'
        from /localdisk/data/ruby/lib/ruby/gems/1.8/gems/rubywarrior-0.1.1/bin/rubywarrior:5
        from /localdisk/data/ruby/bin/rubywarrior:19:in `load'
        from /localdisk/data/ruby/bin/rubywarrior:19

ruanwz commented 14 years ago

Found that the source is different between gem repository and git repository. Fixed it by building the gem using the git repository source.

ruanwz commented 14 years ago

close the issue.