Alright, if that's how you define connect, then the [i] is justified. But be aware that skill70 is skill[69], not skill[70] (because it begins with skill[0]

).
If ent_tmp points to a valid entitiy it should work. To be totally sure, you should make all ENTITY* pointers be NULL when they don't point to an entity. Then you can alway check if(entitiy) to see if it's valid.