Log In  

Hello everyone,
I am kinda new to Pico-8 (as I worked with TIC-80 before). I am working on a game and I was trying to manage the code to be more readable by moving some code around.

I added all the helper functions at the top of the p8 file (as I was trying to move it to another lua file to use the #include command). When I ran the code, no error but it didn't behave as it supposes to do. The helper functions use some global variables so I moved that code to be after the definition of the variables and it worked fine.

Does functions in pico8 lua bind the variables in the function to the global variables when it is defined (which is before the definition of the variables) that's why it is reading nil? I am not amazing with these binding stuff so sorry if I am using incorrect termonolgy.

Ahmed Khalifa

P#64526 2019-05-17 23:25

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2022-12-06 18:31:11 | 0.003s | Q:5