Quote: "Can you explain the error box "Sprite 0 does not exist at line 264"."
That is the error message that you get when you try to do something with a nonexistent sprite. If you provide a sprite id in the command, it feeds that id back to you.
How are you using 'If spriteID > 0' with respect to the function that baxslash put up? The function itself looks mostly okay. Except I would use a while loop instead of a repeat one. The repeat loop will always execute at least once. A while loop would not execute (in this function) if the first call to getSpriteFirstContact produces zero.
I would adjust the code to look like this:
function getSpriteCollisionCount(spriteID)
cnt = 0
c = getSpriteFirstContact(spriteID)
while c=0
spriteID2 = getSpriteContactSpriteID2()
cnt = cnt + getSpriteCollision(spriteID,spriteID2)
c = getSpriteNextContact()
endwhile
endfunction cnt
Cheers,
Ancient Lady
AGK Community Tester and AppGameKit Master