"sometings is wrong with this code"

cached from yesterday:
1. uninitialized locals (mentioned)?
2. NULL passed not NULLVECTOR?
3. path skills array is 3 elements instead of 6 or NULL? ***
4. bad logic / structure?