Ho hum... it still doesn't work! Hmmm... has anyone else tried my code? It all looks good, no matter which way I put it (correctly, that is), but it always seems to point at the limb exist() command. The help file regarding that command kinda confuses me, but I think I have it right.
Original code:
function total_limb(n)
total=0
for x=1 to 500
if limb exist(n,x)=1 then total=total+1
next x
endfunction total
Then I changed it little by little. I got rid of the then and added an endif. I set the x=0. I changed the total=total+1 to inc total. I set the limb exist(n,x) equal to a variable and checked if it =1. I added a code to make sure that the object n existed (even though it wouldn't have been called if the object didn't). I even tried to swicth the n and x. Currently, the code is thus:
function total_limb(n)
total=0
for x=1 to 500
if limb exist(n,x)=1 then inc total
next x
endfunction total
But each time I run it and it gets called, it states that the object doesn't exist! But I know for a fact that it does because I can see it, and I pass the object number into the function (n)!
The only thing that I can think of is that somehow the object that I'm trying to check doens't have limbs according to DB, but that's crazy! Right? I mean because the object that I'm testing the function with is the alien-mutant.x file. That wouldn't have anything to do with it... would it? PLEASE tell me it wouldn't! That could ruin months of programming!!! I would be scarred

for life!!!
Edit: in any case, thanks for your concern: I've been stuck on this all day...
Destroy you with my mind, I could!