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

P#98566 2021-10-13 02:30 ( Edited 2021-10-13 02:30)

:: GPI
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 :)

P#98571 2021-10-13 07:25 ( Edited 2021-10-13 07:27)

[Please log in to post a comment]

Follow Lexaloffle:        
Generated 2021-10-25 19:27:56 | 0.007s | Q:9