TypeError: can't convert String into Integer
/Users/mriffe/dev/play/ww/weewar-spy/lib/weewar-spy/user.rb:43:in `[]'
/Users/mriffe/dev/play/ww/weewar-spy/lib/weewar-spy/user.rb:43:in `initialize'
/Library/Ruby/Site/1.8/rubygems/custom_require.rb:27:in `map'
/Users/mriffe/dev/play/ww/weewar-spy/lib/weewar-spy/user.rb:41:in `each'
/Users/mriffe/dev/play/ww/weewar-spy/lib/weewar-spy/user.rb:41:in `map'
/Users/mriffe/dev/play/ww/weewar-spy/lib/weewar-spy/user.rb:41:in `initialize'
/Users/mriffe/dev/play/ww/weewar-spy/lib/weewar-spy/faction.rb:42:in `new'
/Users/mriffe/dev/play/ww/weewar-spy/lib/weewar-spy/faction.rb:42:in `user'
/Users/mriffe/dev/play/ww/weewar-spy/lib/weewar-spy/faction.rb:78:in `basic_info'
/Users/mriffe/dev/play/ww/weewar-spy/lib/weewar-spy/spy.rb:30:in `debrief'
/Users/mriffe/dev/play/ww/weewar-spy/lib/weewar-spy/spy.rb:28:in `each'
/Users/mriffe/dev/play/ww/weewar-spy/lib/weewar-spy/spy.rb:28:in `debrief'
examples/top-secret.rb:21
examples/top-secret.rb:20:in `each'
examples/top-secret.rb:20

Task 16

You need to login to add comments.
No account yet? Signup is quick and easy.

  • mriffe marked a task as done about 3 years ago.

    Photo_27_small
  • mriffe added a comment about 3 years ago

    Fixed! Stupid XmlSimple for making me write an IF statement. :(

    Photo_27_small
  • mriffe added a comment about 3 years ago

    not sure why, but XmlSimple was returning a hash...oh wait...when there are multiple players an array of hashes is returned - in this case there was only one hash and, i guess, XmlSimple chose not to wrap it in an array - how annoying!

    Photo_27_small
  • mriffe added a comment about 3 years ago

    why am i getting an array instead of a hash? is it because this player only has one preferred by (and one prefers). i can code for the problem but i'd like to know why it's happening in the first place.

    Photo_27_small
  • mriffe added a comment about 3 years ago

    [["name", "Nestafari"], ["id", "28369"]]

    Photo_27_small
  • mriffe added a comment about 3 years ago

    Photo_27_small
  • mriffe created a task for mriffe about 3 years ago.

    Photo_27_small

Task is done

Assigned to:mriffe

Category:Must Have


Tags: