In short, this code works:
function _init() poke(0x5f2d,3) end function _update() if stat(30) then -- prints the pressed key local key=stat(31) printh(key) end end |
And this doesn't:
function _init() poke(0x5f2d,3) end function _update() if stat(30) then -- prints nothing, not even a blank line printh(stat(31) end end |
stat(31) return two values - it seems to be a bug (or an undocumented feature).
Try a additional brace around stat(31)
printh( (stat(31)) )
Oh my, I actually read that it returned 2 values, it just didn't occur to me that it would affect the printh()...
Thanks!
[Please log in to post a comment]