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

[Lua][Error] Trouble with a small text animation thing

Started by rerere284, 16 March 2012 - 07:08 PM
rerere284 #1
Posted 16 March 2012 - 08:08 PM
I'm not sure why this is occurring. Here is the line it occurs on:

print("\")

Here is the full code:
http://pastebin.com/3CESnrmK

It seems like you need to do something else to have a / in a print.

EDIT:
updated scripts:
SCARY:http://pastebin.com/VBJPqPSk
static:http://pastebin.com/7q8btpZz
Advert #2
Posted 16 March 2012 - 08:25 PM
''s escape characters in strings; you'll have to use this:

print("")

The first escapes the second ,meaning that it won't escape the quotation mark).
rerere284 #3
Posted 16 March 2012 - 08:32 PM
Now it says:
bios|278| bad argument| string expected, got function
Advert #4
Posted 16 March 2012 - 08:55 PM
That's (possibly) because of the first line; strings need to be in quotes.


os.loadAPI(static) -> os.loadAPI("static")

It could also be something inside that API that's causing the error.
rerere284 #5
Posted 17 March 2012 - 12:29 AM
That helped, and after a lot of fiddling, it now starts to make the first frame and then says:
SCARY|19| attempt to call nil
that line says:

setCursorPos(middlex - holesize, middley + holesize - prog)


link to SCARY: http://pastebin.com/VBJPqPSk
link to static: http://pastebin.com/7q8btpZz
Advert #6
Posted 17 March 2012 - 12:46 AM
You're looking for term.setCursorPos. Try to make sure you're using the right API when calling functions.