|
| 20 May 2014 09:21 AM |
When I equip my gun it runs the equipped method 6 times til it reached maximum reentry depth.
It's very frustrating to work with. The unequip method does not run 6 times. So why does it behaiv like this? And is there a solution for this bug?
My code (localscript): Tool.Equipped:connect(onEquippedLocal) Tool.Unequipped:connect(onUnequip) |
|
|
| Report Abuse |
|
|
|
| 20 May 2014 09:24 AM |
Is that the script? >.>
~masterCameron101, advanced Lua programmer, certified in Photoshop. Have I helped you? Don8~ |
|
|
| Report Abuse |
|
|
|
| 20 May 2014 11:10 AM |
| It'd be easier for me to identify whats wrong if I could see more of the script :P |
|
|
| Report Abuse |
|
|
|
| 20 May 2014 11:12 AM |
You can probably add a debounce to the equipped function until the tool is unequipped so it doesn't fire that.
If you are calling OnEquipped somewhere else, that might be causing the stack overflow because you are infinitely calling the function. |
|
|
| Report Abuse |
|
|
|
| 20 May 2014 06:02 PM |
Yeah I used my own variable to solve the issue. Problem is, this maximum reentry error occures on somethings as simple as a textbutton.
Reason more code wasn't given was because I was certain it was not the issue and it would only confuse the reader. Thanks anyways guys :) |
|
|
| Report Abuse |
|
|