Page 2 of 2

Re: Can't call table values??

Posted: Sat Jul 20, 2024 3:40 am
by ThatBoiNavy
RNavega wrote: Sat Jul 20, 2024 2:12 am
ThatBoiNavy wrote: Fri Jul 19, 2024 9:09 pm I dont think the local module would matter as I haven't used local in the script.
Oh, I mean "local module" as in the module you have in your hard drive, which seems to be different than the module over in Replit's servers. Not as in "local vs global".

If you can't post the whole project for privacy reasons, maybe just attaching camera.lua so we can see how it's supposed to be initialized. As you've tried, it needs to be something different than what you had in your original script. Maybe the snippet that MrFariator shared.
just realized the code for anim8 was in camera instead of the camera.lua. I have made at least 100 mistakes in coding and this has to be the dumbest of mine... comes up with a new error however:
Error: main.lua:20: attempt to index global 'anim8' (a boolean value)
stack traceback:
[love "boot.lua"]:352: in function '__index'
main.lua:20: in function 'load'
[love "callbacks.lua"]:136: in function <[love "callbacks.lua"]:135>
[C]: in function 'xpcall'
[love "boot.lua"]:368: in function <[love "boot.lua"]:355>
[C]: in function 'xpcall'
Program completed in 7.93 seconds (pid: 11988).

Tis the life of a programer

Re: Can't call table values??

Posted: Sat Jul 20, 2024 7:20 pm
by RNavega
From the error message it does find something called "anim8" and imports it, but it's not being used properly (it's returning a Boolean, like true or false, not a table or function).

My suggestion is to re-download the latest camera.lua and anim8.lua and work on an isolated demo using them, like a sanity test that they're working right. After that, you'll know what you need to make them work in your original project.

Re: Can't call table values??

Posted: Sun Jul 21, 2024 11:37 am
by ThatBoiNavy
RNavega wrote: Sat Jul 20, 2024 7:20 pm From the error message it does find something called "anim8" and imports it, but it's not being used properly (it's returning a Boolean, like true or false, not a table or function).

My suggestion is to re-download the latest camera.lua and anim8.lua and work on an isolated demo using them, like a sanity test that they're working right. After that, you'll know what you need to make them work in your original project.
Alright I try that!