Twan
Sergeant Knight

Testing the last version of my mod (I was not doing anything, just pressing space and watching units behavior with the control T cheat) I encountered the following bug : suddenly messages started to be displayed or appear in the log without any logic (messages from the SoD upgrade system like "Upgrade All." or "You don't have heavy gear to upgrade these units" ; and also the message saying I had lost relation with factions - the one used when you are vassal and your kingdom declare war- ; but my relations stayed at 0).
It was especially strange as I never entered any dialog in this game nor any situation where these messages could have a reason to be loaded. There were some script errors in the RGL log about invalid parties/factions ID (I guess due to me forgeting to check if a party is active somewhere), but I would be surprised if it's the thing triggering this message bug (btw in earlier versions I had far more errors like that without the random messages). I rather suspect that something in my code bugs the compiler and make it create corrupted txt files (but there is no error message when I compile).
Do someone already had this bug and know how to fix it ?
ps : some particularities of my mod I suspect
- my scripts file is extremely long (more than 30k lines)
- I store data in high faction slots numbers (up to slot no. 1000+)
- one of my scripts is near the limit of local variables use (I had to cut a very big script in several parts the first time I compiled auxiliarii v2 because it was using too many local variables)
It was especially strange as I never entered any dialog in this game nor any situation where these messages could have a reason to be loaded. There were some script errors in the RGL log about invalid parties/factions ID (I guess due to me forgeting to check if a party is active somewhere), but I would be surprised if it's the thing triggering this message bug (btw in earlier versions I had far more errors like that without the random messages). I rather suspect that something in my code bugs the compiler and make it create corrupted txt files (but there is no error message when I compile).
Do someone already had this bug and know how to fix it ?
ps : some particularities of my mod I suspect
- my scripts file is extremely long (more than 30k lines)
- I store data in high faction slots numbers (up to slot no. 1000+)
- one of my scripts is near the limit of local variables use (I had to cut a very big script in several parts the first time I compiled auxiliarii v2 because it was using too many local variables)