This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
TYKUHN2's profile picture

[1.78][SSP]Dofile does not exist

Started by TYKUHN2, 16 March 2016 - 12:34 AM
TYKUHN2 #1
Posted 16 March 2016 - 01:34 AM
VERSION:
Computercraft 1.78

DESCRIPTION:
Dofile returns Attempt to call nil even when running a file filled with "print('TEST!')" Tested using Lua console. Loadfile("test")() does expected.

EXPECTED RESULT:
"TEST!" is printed.

REPRODUCTION STEPS:
Type lua. Choose any file. Run dofile(filename)

Edit: Also seems to be an issue in 1.79pr0 and pr1 according to Github.
Edited on 16 March 2016 - 12:39 AM
CrazedProgrammer #2
Posted 16 March 2016 - 09:42 AM
That's weird.
It works for me in 1.78, but not in 1.79pre1 (due to a typo in bios.lua).
Are you sure you're running 1.78 and that you made no mistakes like writing dofile with an uppercase letter?
TYKUHN2 #3
Posted 16 March 2016 - 06:47 PM
Jar file and forge both claim 1.78 (Minecraft 1.8.9) and I avoid using uppercase for anything but secondary words. I will double check though.

Can confirm. Lower case letters. Only tested on advanced computer and advanced pocket.
apemanzilla #4
Posted 17 March 2016 - 01:02 AM
It's due to a typo in the bios.lua. I reported it on the GitHub issues page a bit ago. It works fine in 1.78 though, this bug was only introduced in 1.79pr0.
TYKUHN2 #5
Posted 17 March 2016 - 07:14 PM
Figured out the issue. Dofile does not exist in 1.78 without Lua 5.1 functions