Postby Sambo » Sun Jul 24, 2016 6:06 pm
Ok, here's what's going on: I made an API. This API uses Textblox to display debug information. In the level I originally used to test the API, Textblox works just fine. In my episode, the error occurs on the first tick, in all of the 2 or 3 levels I tested it in. I tried calling the API separately in lunaworld.lua and lunadll.lua, and it still threw the same error every time. Since this API hasn't been released, I don't really want to post some link to it that everyone can see, so I'll send you a folder with all the CGFX and lua files, the API, and one level, via PM. I would like to ask that you don't use the API for your personal use or tell people about it until I release it. This could take a while while I set it up.
Edit: I don't know if I'm going to PM you anything. In the folder I was going to send, it works with all the .lua files in there. In my episode folder, it still doesn't work, though. So, it appears that some condition other than what's in the lua files is screwing it up, which makes no sense. At all. I tested it in the same levels as I did before, and it works, but not in my episode folder. Apparently, my episode folder is somehow making Textblox unable to load some file.
Edit 2: I copied all the files in my episode folder into the folder I was going to send you. It still ran in there. I copied all the files from THAT folder back into my episode's folder. It still didn't work there. I opened the properties for both folders and compared them. The only file that was different was a custom icon I created to use for the folder, so I restored the default settings for the folder icon. It still didn't work. I deleted the episode folder and renamed the other one to the same name, and then it worked until I tried to use a custom icon for the folder again. I repeated the whole process but didn't use a custom icon, and it worked. So, this whole nightmare was caused by giving the folder a custom icon. Apparently, a custom icon causes some screwy meta-change to happen to the folder, which breaks Textblox.lua somehow and can't be reversed unless you delete the folder entirely. This is no big deal, since I don't need the custom icon, but why, though? This makes no sense!
The custom folder icon option is an obscure feature of Windows that no one uses, like ever. But if anyone is using Textblox.lua, don't use this feature, in ANY of the path to your level folder, since it breaks it for some unknown reason.