Your english is fine. I haven't gone through the complete code you posted. However at the end there is a pretty obvious error. First you function does not return necessarily anything usefull. Always be carefull when placing return statements inside an if statement. If _type is unequal to TYPE_VAR you haven't defined any return statement at all and the return value will become random data.

Second you're assigning wrong types of data to each other. What you return is a fixed/var type and you're assigning this to a string. Why do you do the conversion to a fixed value with str_to_num? Even the type of your function "function" which means var or fixed is misleading.

So steps to fix this are:
1. replace "function load_cfg(var _id, var _type, STRING* _file)" with "STRING* load_cfg(var _id, var _type, STRING* _file)".
2. Ensure your function returns under any circumstances a pointer to a string.
3. Remove the str_to_num conversion from the return statement.

Btw. That first comment, ist this your error message?


Always learn from history, to be sure you make the same mistakes again...