Hey,

thanx for your help once gain. I looked through your improved code and I have to admit that it is somewhat better than my original one. However (I should have mentioned this before, sorry) I can't use it because it is written in lite-c. I'm usinc c-script. Asking me why? Well, I started my "career" as a hobby-programmer in Delphi and then switched to 3DGS and c-script looked a LOT more readable to me 'cause it has some similarities to Delphi...
So: is there a way to improve my code while remaining in c-script and not switching to lite-c in the process?