[c12527] Store how many texts are loaded for validity checks. Use this with EventAI
[c] Fix some warnings