Your inventory and g_time tables are properly formatted, but the rest of it is still a mess. You should also include the accurate line numbers so that we can more easily see which line results in the error, i.e. what’s on line #70?
The easier you make it for others to read your code and replicate your error, the more likely you are to get an answer.
I had a quick look at your code, but there isn’t enough for me to replicate the problem, nor do I know on which line or how you encounter the problem. I would have to parse your code word by word, looking for any kind of typo or mistake, and that would take far longer than I am comfortable with.
Your inventory and g_time tables are properly formatted, but the rest of it is still a mess. You should also include the accurate line numbers so that we can more easily see which line results in the error, i.e. what’s on line #70?
The easier you make it for others to read your code and replicate your error, the more likely you are to get an answer.
I had a quick look at your code, but there isn’t enough for me to replicate the problem, nor do I know on which line or how you encounter the problem. I would have to parse your code word by word, looking for any kind of typo or mistake, and that would take far longer than I am comfortable with.