Hey all, I’ve been pulling my hair out!!!
When my app starts, I am attempting to copy a file from my resource directory to the system.DocumentsDirectory and when I try to run the app in the simulator, it throws the following error back:
attempt to call global ‘copyFile’ (a nil value)
stack traceback:
[C]: in function ‘copyFile’
I’ve even tried making this the only line of code in my main.lua and it is still throwing back the above error:
copyFile( “data.txt”, system.ResourceDirectory, “data.txt”, system.DocumentsDirectory )
My directory for this project contains the following files, so I can confirm the file is there:
build.settings
config.lua
data.txt
main.lua
I’m going NUTS! What am I missing here?