Exactly Tigertao!
One thing Ive noticed, is that when you do assign two different names to the same skill number, the program will still "generally" refer to the right one.
By mistake, I had assigned two different names to the same skill number for an entity. One skill name was "Health", and the other was "Path_Slot". Health could have been any number, positive or negative. Path_slot however was a number that referenced an array index. Array indexes cannot be negative nor exceed the array length.
Also, another thing to look out for is checking to see if an entity's skill is ZERO. The bullets in my game had a skill called "bullet_id". The rockets had their own "shell_id". There was a chance that an AI would get hit by the shell and ask for it's bullet_id. Since the shell's bullet ID was zero, since it wasnt assigned, the AI began shooting at target ID zero.......which was the player......across the map minding his own business.