| RadShad (1) | |||||||
|
So in this simple RPG in CMD I'm having trouble getting an ASCII character that was converted from a character. That sounds a little confusing so let me show you. Here is my map:
ds are converted somewhere down the line to ░:
where dirt equals 176, the code for ░. There is where I have trouble:
Where I have the arrow (Line 6) is where my problem is. When I check to see if 'd' is there, it doesn't return "test". I understand this is because previously I had changed d to ░, but if I just put ░ in the code, that doesn't work, neither does putting 176. If I don't convert d to ░, "test" is returned. So the questions is, how can I get ░ to return "test"? | |||||||
|
|
|||||||
| Null (779) | |
Declare Map2 as unsigned char Map2[10][30]. char can hold values between +128 and -128, but '░' has ascii value 176, so comparison didn't work.
| |
|
|
|