Save-Point
Cannot convert fixnum into string - Printable Version

+- Save-Point (https://www.save-point.org)
+-- Forum: Games Development (https://www.save-point.org/forum-4.html)
+--- Forum: Code Support (https://www.save-point.org/forum-20.html)
+--- Thread: Cannot convert fixnum into string (/thread-4936.html)



Cannot convert fixnum into string - firevenge007 - 12-22-2013

It's very complicated from what I can see, and I tried solving it on my own, but whatever I do, the problem seems to be stuck in a script I'm using called Bigace's warrior engine.

The line is approximately 670 and tells me that it 'cannot convert fixnum into string', which I'm pretty sure has to do with a problem with variables.

Anyways, the script I'm using is needed to use the slipping script I am also using, which aids me make puzzles with forced slipping movement

I am posting the Scripts.rxdata if anyone wishes to help me, and it would be greatly appreciated if anyone could.

https://www.dropbox.com/s/fy5oo6ff5vltwpm/Scripts.rxdata


Thank you very much for your time.


RE: Cannot convert fixnum into string - MechanicalPen - 12-22-2013

It looks like you were trying to 'draw_text' a number without first using '.to_s' I couldn't tell you where, as you only posted a collection of scripts and not your protect, but in Ruby, if you need to print out a number, you first have to change it to a string with '.to_s'


RE: Cannot convert fixnum into string - firevenge007 - 12-22-2013

If I posted my full game project, would you be willing to help me?


RE: Cannot convert fixnum into string - MechanicalPen - 12-22-2013

sure, I guess.


RE: Cannot convert fixnum into string - firevenge007 - 12-23-2013

https://www.dropbox.com/s/72916idbsfhdfnm/Project%20Error.zip

This is the link to the full project

If you can solve this issue, I'd love you for ever.


RE: Cannot convert fixnum into string - MechanicalPen - 12-23-2013

Working on it now. For future reference, there's no need to include the RTP until you are ready to release your game to people outside this forum. We all already have it, and you'll save everyone some download time that way.

...So, at what point does this bug happen?

Edit: I found it. WEngine script line 1738. draw_text(rect, item.price, 2) should be draw_text(rect, item.price.to_s, 2)


RE: Cannot convert fixnum into string - firevenge007 - 12-24-2013

Thank you - I wasn't sure where I had to put a ".to_s" since there were so many options