CC: Tweaked

CC: Tweaked

42M Downloads

Weird cc.internal error `...internal/syntax/errors.lua:577: No such token 40` with `goto`

fatboychummy opened this issue ยท 2 comments

commented

Minecraft Version

1.16.x

Version

1.109.0 (eval.tweaked.cc and copy-cat)

Details

This is one I can only replicate on the CC:Aide Discord bot (perhaps it hasn't updated to a new version?). When running the following code,

::a::

local function x()
  ::b::
  goto exit
end

goto a

::exit::

I get the following error:
image

However, when running the same code in copy-cat it shuts the computer down. Seems an error replicates up to the shell somehow because it kills the shell with a too long without yielding error (and the timing is ~6-7 seconds after starting the program), instead of doing the whole ComputerCraft may be installed incorrectly thing.

commented

I'm doing more testing with the latter part of this here, and it seems like it may be a separate issue altogether?

It seems that copy-cat is spamming too long without yielding errors at the lua code, because if I run the following:

local function x()
  while true do end
end

while true do
  print(pcall(x))
end

It spits out false, bla.lua: too long without yielding about 20 times before kicking it to the forced shutdown ComputerCraft may be installed incorrectly thing.

Those too long without yielding errors are somehow replicating their way up to the shell (or just getting sent to the shell even after the program crashes?).

commented

Thanks for the report, should be fixed by af12b3a.