Not logged inGosu Forums
Forum back to libgosu.org Help Search Register Login
Up Topic Gosu / Gosu Exchange / Uninitialized constant error all of a sudden
- - By dsr Date 2013-07-20 12:45
I'm really not sure what happened here....

One minute my game was working, and the next I was getting the following error:

`initialize': uninitialized constant Gosu::KbRangeBegin

Any help on somewhere to start to figure this out would be appreciated.
Parent - - By jlnr (dev) Date 2013-07-20 12:58
This probably happened because you've updated Gosu. I've removed the KbRangeBegin constant, which was only leaked into Ruby/Gosu because of a configuration error - it is actually part of my internal bookkeeping. What do you use this constant for?
Parent - By dsr Date 2013-07-20 16:07
Ah. I wondered. I did update Gosu.

I'm using it, and a few others, to capture all the key codes in a spelling game. I'm using the code from the Chingu examples actually.

@key_codes = (Gosu::KbRangeBegin..Gosu::KbRangeEnd).to_a +
                  (Gosu::GpRangeBegin..Gosu::GpRangeEnd).to_a +
                  (Gosu::MsRangeBegin..Gosu::MsRangeEnd).to_a
    # End key detection https://github.com/ippa/chingu/blob/master/examples/tests/tool1_input_codes.rb
Parent - - By Spooner Date 2013-07-20 18:03
I use it in Chingu to ensure that all keys have been mapped from Gosu to their Chingu equivalents (from KbRangeBegin to KbRangeEnd) :D
Parent - - By dsr Date 2013-07-21 14:31
Should I be using something else then?
Parent - - By dsr Date 2013-07-21 17:52
Hang on. I think I'm starting to figure some solutions out.
Parent - By Spooner Date 2013-07-21 20:51
Nah, the only place I use it in is that tool to check what keys are called in both Gosu and Chingu (as far as I know). You can always run it with an old version of Gosu (to avoid the begin/end values being missing); the key names will be the same in newer versions of Gosu.
Up Topic Gosu / Gosu Exchange / Uninitialized constant error all of a sudden

Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill