Log In  

hi so i am making a game, and i got unclosed function runtime error attempt to call a string function

i literally just learned lua and im brand new to pico 8 can someone help explain how to fix it?

P#109934 2022-04-08 22:54

Can you post the code which is causing the problem?

From the description it sounds like you have something like this:

a_string_variable = "hello"

function some_function()
   a_string_variable() -- trying to call a string variable
end

But without seeing the actual code it's going to be hard for anybody to give specific advice.

P#109935 2022-04-08 23:08
1

Unclosed function means that pico-8 couldn't find the "end" keyword to match a "function" keyword. If you have a complicated function, it could be the result of just forgetting one instance of "end". Another possibility is that the parentheses, brackets, commas, or quotation marks aren't correct somewhere and the code parser just returned the most clear sign of an error.

The "error attempt to call a string function" can be the result of what jasondelaat said (and it would be helpful to post the code around the part the error says), but I've also seen it come up erroneously as a result of failing to parse the function properly.

P#109979 2022-04-09 20:45

[Please log in to post a comment]