16.01.2015, 13:56
'label' and 'amount' are local variables which means their values are discarded when the function ends. If you want to keep a variable in memory between function calls use static instead of new.
Logically your current code should create a new label displaying 24 every time the object is shot. Yet that doesn't happen, which tells me there's something wrong on a higher level. Is the object solid? Have you verified that hitid actually contains anything?
Logically your current code should create a new label displaying 24 every time the object is shot. Yet that doesn't happen, which tells me there's something wrong on a higher level. Is the object solid? Have you verified that hitid actually contains anything?