cryptic error when shard_include can't load a file
I think that's what the error message is telling me:
[f=-000001] <SkirmishAI: Shard git (team 0)>: ...\Spring\AI\Skirmish\Shard\git\ai\preload/globals.lua:31: loop or previous error loading module 'taskqueuebehaviour'
stack traceback:
[C]: ?
[C]: ?
[C]: in function 'require'
...\Spring\AI\Skirmish\Shard\git\ai\preload/globals.lua:31: in function 'shard_include'
...es\Spring\AI\Skirmish\Shard\git\ai\BA\behaviours.lua:1: in main chunk
[C]: in function 'require'
...\Spring\AI\Skirmish\Shard\git\ai\preload/globals.lua:31: in function 'shard_include'
...Spring\AI\Skirmish\Shard\git\ai\behaviourfactory.lua:4: in main chunk
[C]: in function 'require'
...\Spring\AI\Skirmish\Shard\git\ai\preload/globals.lua:31: in function 'shard_include'
...ents\My Games\Spring\AI\Skirmish\Shard\git\ai\ai.lua:4: in main chunk
This is the result of my attempt to test the compatibility of my fork https://github.com/eronoobos/Shard with the Spring Skirmish AI library.
hmmm how do you know it's recursing? It's loading a file that immediatley loads another file, the problem was that it couldn't be found for whatever reason
Ahh, okay, that's what it means. Why "loop"? And why "previous error"?
If taskqueuebehaviour isn't found, that's odd, because it's in both the game subdirectory and the ai directory.
ahhhh, i see, i just had to send the error of pcall to the console when it fails. the file is found, but can't be loaded for reasons within the code within the file:
[f=-000001] <SkirmishAI: Shard git (team 0)>: require can't load BA/commonfunctions error: ...ring\AI\Skirmish\Shard\git\ai\BA/commonfunctions.lua:39: attempt to index global 'ai' (a nil value)
[f=-000001] <SkirmishAI: Shard git (team 0)>: require can't load commonfunctions error: ...ring\AI\Skirmish\Shard\git\ai\BA\commonfunctions.lua:39: attempt to index global 'ai' (a nil value)
[f=-000001] <SkirmishAI: Shard git (team 0)>: require can't load BA/taskqueues error: ...es\Spring\AI\Skirmish\Shard\git\ai\BA/taskqueues.lua:17: attempt to index global 'game' (a nil value)
[f=-000001] <SkirmishAI: Shard git (team 0)>: require can't load taskqueues error: ...es\Spring\AI\Skirmish\Shard\git\ai\BA\taskqueues.lua:17: attempt to index global 'game' (a nil value)
(aka my BA config's fault)
Ah, we should work that into the shard_include function so that it's less cryptic :) Good catch!
https://github.com/eronoobos/Shard/commit/fa9b25e9252243004fe26b5226430f0b35c90ade whenever i can resolve the incompatibility, these changes might make it to this repo :-P