Log In  


Hello,

I have a problem with some code in version 0.2.3 that worked up to the previous version:

  if stat(30)  then
      local k = ord(stat(31))
  end

ord(stat(31)) always returns null but was returning the correct value before.

It works if changed to:

  if stat(30)  then
      local k = stat(31) k=ord(k)
  end

The RoboZ

1


1

Congratulations, it seems that you found a undocumented feature.

it seems that stat(31) returns two values now

poke(0x5f2d,0x1)
repeat
  cls()
  a,b,c=stat(31)
  print(tostr(a)..", "..tostr(b)..", "..tostr(c))
  flip()
until false

and that is the problem.

an addition brace should solve this

if stat(30)  then
  local k = ord((stat(31)))
end

But it seems that the second return value is always zero - does anybody know what it does?
or maybe the second parameter is a bug... I don't know :)



[Please log in to post a comment]