Code:
read_argv(4, szCmd, sizeof szCmd);
There is only 1 argument with the say command.
The SayText message on the other hand contains 4 arguments, and the text is within the 4th argument if it's a say command that triggered the message.
sizeof is not suitable for strings alone. use sizeof X -1 or charsmax().
Code:
new iNum;
healthPotion[iNum]
Makes no sense at all.
iNum will cause index out of bounds unless limited.
You're far better of hardcoding it. This only increases the CPU usage and decreases readability, unless I'm misunderstanding something.
__________________