Robbery
#4

'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?
Reply


Messages In This Thread
Robbery - by cnoopers - 15.01.2015, 23:43
Re: Robbery - by Lynn - 16.01.2015, 00:39
Re: Robbery - by cnoopers - 16.01.2015, 13:19
Re: Robbery - by Vince - 16.01.2015, 13:56

Forum Jump:


Users browsing this thread: 1 Guest(s)