I do not understand how you can clain that the UDFs are poorly documented. All UDFs follow the same exant header style as the build-in KiXtart functions/commnads. Additionally, the FAQ Forum contains extensive explanantions on how to use UDFs.

.INI files should/must be read via READPROFILESTRING as they are not ordinary text files and follow a very specific format.

You are using GOTOs in your code, which unfortunately prevents me from analyzing it. You also do not post code within [CODE] tags and don't use indentations, which also make it hard to read your code.
_________________________
There are two types of vessels, submarines and targets.