what is wrong with this code??

anonymous via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Oct 17 07:59:39 PDT 2015


On Saturday, October 17, 2015 04:50 PM, steven kladitis wrote:

> core.exception.RangeError at sokuban.d(84): Range violation

Line 84 being this:
----
sDataBuild ~= sMap[ch];
----

Where sMap is:
----
        /*static*/ immutable sMap =
            [' ':' ', '.':'.', '@':' ', '#':'#', '$':' '];
----

Apparently, ch is some char that's not a key in sMap. Try printing out ch to 
see what it is exactly. Then, assuming it's really not a key in sMap, figure 
out if sMap should have that key, or if ch should not end up with that 
value.


More information about the Digitalmars-d-learn mailing list