what is wrong with this code??
steven kladitis via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Oct 17 08:09:55 PDT 2015
On Saturday, 17 October 2015 at 14:59:41 UTC, anonymous wrote:
> 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.
Yes!!! Now it makes sense!!! Thanks....
More information about the Digitalmars-d-learn
mailing list