Debriefing > Questions, Help, & How To's
Read Me
Slinky:
With gamecycle.lua and elminatio.lua int he same directory, and using dofile(), I get that error. However, when I change it to loadfile(), I no longer get a "no such file or directory" error. However:
Previously when Think() ran, it said that it had a problem trying to call a nil value, with no additional details.
Now it throws an error when calling think(): 'attempt to call global TestFunc: a nil value'. So that says to me that loadfile() may still be failing, but silently. This happens when gamecycle.lua is in the other two directories you named as well.
Slinky:
I've just verified- I removed gamecycle.lua from my steam folders completely and it's still doing the same thing, so probably not reading gamecycle.lua successfully.
Slinky:
Was there ever an answer discovered for this?
killermonkey:
Awesome, here's a reference i just found:
http://www.lua.org/pil/8.1.html
It uses the LUA command require <filename>, where require actually lets you specify a path to search on.
You can set that path by setting the global variable: LUA_PATH to a string and thats it.
I have added direct support for this newly found feature in Beta 4 where the LUA_PATH global variable will be defined based on the full path to gesource/scripts/gameplay so future use of "require" will be meaningful without declaring your own variable
Slinky:
Awesome, thank you.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version