Minus (and other symbolic keys) doesn't work!

Sunflower

  • Posts: 591
So, I was trying to make in my game some sort of text field. Not only to add letters and numbers, but also some more special characters, like periods, commas etc. So I added this all to Controls thingy (this was quite a bit of work, I must say O.o) and tried to test it.

When it's just about numbers or letters, everything works fine, however, minus (and probably other keys, like equality key) isn't registered. I mean, when I tried to use single key-getting function with minus (others where temporarily deactivated), the wall of errors saying "null object" appeared (well, probably because key check is done in "always" block ^^'). I was wondering if it has something to do with number of controls, however, when I tried to retrieve minus somewhere else, it didn't work, either.

I decided to write it in "Bugs" forum, because it doesn't seem that I was the one who did something wrong here (after all, I was just using key-checking function with key I had in Controls list). I hope you can fix this thing, as well as check all other symbolic keys (equality, slash & backslash, square brackets, semicolon and quote, period and comma). O.o

mikbob

  • Posts: 493
I could help you if you were more specific. Where did you put the minus character for it not to work. Secondly, what exactly happens when you put the minus in. Lastly, try putting other 'symbolic characters'  in there and see what happens.

Hope this helps,
Mikbob

Visit Our Site!  http://www.mikbobgames.com
Play The Platforms 2!  http://bit.ly/theplatforms2
Check out our twitter!  www.twitter.com/mikbobgames

Sunflower

  • Posts: 591
Gah, it's not that I put a minus sign or character somewhere. It's just that I use minus key at all!

Anyway, I did a little test, with this in "always" block:
if <[Fail][was pressed]>
  print [Success]
(please don't comment my choice of print messages and keys names O.o)

After changing a key for "Fail", I've discovered that following keys don't work:
 - minus sign
 - equal sign
 - open bracket
 - close bracket
With any of those being in "always" block check game spams me with prints:
Error in always for behavior DoSomething
ERROR: null object

Exactly as if those keys were treated as nulls. O.o

mikbob

  • Posts: 493
Gah, it's not that I put a minus sign or character somewhere. It's just that I use minus key at all!

Anyway, I did a little test, with this in "always" block:
if <[Fail][was pressed]>
  print [Success]
(please don't comment my choice of print messages and keys names O.o)

After changing a key for "Fail", I've discovered that following keys don't work:
 - minus sign
 - equal sign
 - open bracket
 - close bracket
With any of those being in "always" block check game spams me with prints:
Error in always for behavior DoSomething
ERROR: null object

Exactly as if those keys were treated as nulls. O.o
Ok, thanks for the information. I don't actually know how to help you with the problem as a thought it was something else.

Hope you get your answer,
Mikbob

Visit Our Site!  http://www.mikbobgames.com
Play The Platforms 2!  http://bit.ly/theplatforms2
Check out our twitter!  www.twitter.com/mikbobgames

Sunflower

  • Posts: 591
Alright, got back to that problem after more than a year... O.o'

I've checked and:
 - minus sign still doesn't seem to work
 - back quote (tilde) gives massive number of "ERROR: null print"s, as well as tab (apparently I didn't care about them enough earlier)
 - backslash works... once, and then it's treated like it's constantly pressed O.o'
 - equals sign, open bracket and close bracket don't seem to work, BUT when I tried inserting there "FlxG.keys.justpressed(stuff)", where stuff was "PLUS", "LBRACKET" and "RBRACKET", respectively, then they worked properly (I've checked "MINUS" and it wasn't working); wrong mapping by Stencyl, perhaps? O.o'

I don't know about these definitely-not-working keys, maybe it has something to do with console? O.o' But yes, I tested with console disabled and it didn't want to work, either. :<