A Roblox Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.

A Roblox Community

A community of Robloxians who want to learn to script and build on Roblox Studio.
 
HomeLatest imagesRegisterLog in
If you're a experienced coder make some tutorials! It would really help the site grow.
Make sure you read the rules(Which can be found by clicking here)
If you're a beginner at coding, try some tutorials.
We have many Moderators/Admins watching this site. Contact them with Questions.
Let us know what your favorite sport is. By clicking here to vote (Click here)
This site is becoming inactive. Lets make it active.
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Top posters
blueymaddog
Why am I exceeding the re-entrancy depth? Vote_lcapWhy am I exceeding the re-entrancy depth? Voting_barWhy am I exceeding the re-entrancy depth? Vote_rcap 
naknak
Why am I exceeding the re-entrancy depth? Vote_lcapWhy am I exceeding the re-entrancy depth? Voting_barWhy am I exceeding the re-entrancy depth? Vote_rcap 
Supernapalm
Why am I exceeding the re-entrancy depth? Vote_lcapWhy am I exceeding the re-entrancy depth? Voting_barWhy am I exceeding the re-entrancy depth? Vote_rcap 
m27frogy
Why am I exceeding the re-entrancy depth? Vote_lcapWhy am I exceeding the re-entrancy depth? Voting_barWhy am I exceeding the re-entrancy depth? Vote_rcap 
slayer9365
Why am I exceeding the re-entrancy depth? Vote_lcapWhy am I exceeding the re-entrancy depth? Voting_barWhy am I exceeding the re-entrancy depth? Vote_rcap 
myrco919
Why am I exceeding the re-entrancy depth? Vote_lcapWhy am I exceeding the re-entrancy depth? Voting_barWhy am I exceeding the re-entrancy depth? Vote_rcap 
branefreez
Why am I exceeding the re-entrancy depth? Vote_lcapWhy am I exceeding the re-entrancy depth? Voting_barWhy am I exceeding the re-entrancy depth? Vote_rcap 
ninga95
Why am I exceeding the re-entrancy depth? Vote_lcapWhy am I exceeding the re-entrancy depth? Voting_barWhy am I exceeding the re-entrancy depth? Vote_rcap 
CloneTrooper787
Why am I exceeding the re-entrancy depth? Vote_lcapWhy am I exceeding the re-entrancy depth? Voting_barWhy am I exceeding the re-entrancy depth? Vote_rcap 
raboy117
Why am I exceeding the re-entrancy depth? Vote_lcapWhy am I exceeding the re-entrancy depth? Voting_barWhy am I exceeding the re-entrancy depth? Vote_rcap 
Top posting users this month
No user
Latest topics
» Where to go from here.
Why am I exceeding the re-entrancy depth? EmptySeptember 14th 2020, 1:20 pm by MrNicNac

» Send me an Email
Why am I exceeding the re-entrancy depth? EmptySeptember 14th 2020, 1:16 pm by MrNicNac

» [v1.6.0.0] Lua Script Obfuscator [No Bytecode]
Why am I exceeding the re-entrancy depth? EmptyJuly 6th 2015, 7:38 pm by m27frogy

» New Site Possibly
Why am I exceeding the re-entrancy depth? EmptyJuly 6th 2015, 4:16 pm by m27frogy

» Ambassador!
Why am I exceeding the re-entrancy depth? EmptyApril 15th 2015, 11:40 pm by naknak

» Boop - Tag
Why am I exceeding the re-entrancy depth? EmptyApril 13th 2015, 9:46 pm by naknak

» Vip Class Script
Why am I exceeding the re-entrancy depth? EmptyApril 13th 2015, 4:54 pm by naknak

» Who's active?!
Why am I exceeding the re-entrancy depth? EmptyApril 13th 2015, 4:52 pm by naknak

» Genesis Point
Why am I exceeding the re-entrancy depth? EmptyJuly 17th 2014, 7:04 pm by branefreez

» Reward System
Why am I exceeding the re-entrancy depth? EmptyJuly 17th 2014, 5:41 am by m27frogy

» Script Request
Why am I exceeding the re-entrancy depth? EmptyJuly 10th 2014, 11:43 am by naknak

» local scripts?
Why am I exceeding the re-entrancy depth? EmptyJuly 10th 2014, 11:39 am by naknak

» Project: Reconstruction [Died]
Why am I exceeding the re-entrancy depth? EmptyJuly 10th 2014, 11:36 am by naknak

» Hi. I am new here
Why am I exceeding the re-entrancy depth? EmptyApril 26th 2014, 4:01 pm by altshiftkey

» What's your favorite sport?
Why am I exceeding the re-entrancy depth? EmptyJanuary 1st 2014, 2:13 pm by m27frogy

» FlashLight Script
Why am I exceeding the re-entrancy depth? EmptyJanuary 1st 2014, 2:11 pm by m27frogy

» Gun Making! [READ DESC]
Why am I exceeding the re-entrancy depth? EmptyJanuary 1st 2014, 2:10 pm by m27frogy

» Hi, I am new here!
Why am I exceeding the re-entrancy depth? EmptyNovember 26th 2013, 3:33 pm by Keanu73

» Improve Coding
Why am I exceeding the re-entrancy depth? EmptyOctober 26th 2013, 1:12 pm by pook03

» Simple Button
Why am I exceeding the re-entrancy depth? EmptySeptember 1st 2013, 6:19 pm by branefreez


 

 Why am I exceeding the re-entrancy depth?

Go down 
4 posters
AuthorMessage
tgp1994
Intermediate Scripter
Intermediate Scripter
tgp1994


Posts : 17
Join date : 2012-06-27

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptySeptember 27th 2012, 7:38 pm

Hi everyone,

I'm having a weird issue where, when my tool is equipped, my onSelected function runs six times, then the script is terminated, with the output saying maximum event re-entrancy depth exceeded.

Looking at a snippet of my code,

Code:
me = nil --Tools are placed in the Character model when they're taken out, this variable must be set once the tool is taken out.
msg = nil

function onSelected(mouse)
   print("Selected Local")
   me = script.Parent.Parent
   mouse.Icon = Cursor["gun"]
   --mouse.Button1Down:connect(function() onButton1Down(mouse) end)
   --mouse.Button1Up:connect(function() onButton1Up(mouse) end)
   --mouse.Idle:connect(function() Idle(mouse) end)
   --mouse.KeyDown:connect(keypush)
   msg = Instance.new("Message")
   msg.Parent = me
   msg.Text = ""
   print("Message placed in "..tostring(me))
end

bin.Equipped:connect(onSelected)

can anyone tell why this function is being repeated multiple times when it should only run once?
Back to top Go down
m27frogy
The Garbageman
m27frogy


Posts : 336
Join date : 2011-06-23

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyOctober 28th 2012, 8:14 pm

This error means that too many events immediatly fire the same event which fires the same event again and into infinity....
Back to top Go down
tgp1994
Intermediate Scripter
Intermediate Scripter
tgp1994


Posts : 17
Join date : 2012-06-27

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyOctober 28th 2012, 9:34 pm

Thanks for the help frogy,

I posted this on the roblox forums, and it turned out to be something a little more complicated than that - it actually was a bug in roblox its self. The suggested temporary workaround was to put a wait(0) command at the beginning of the hooked function that was causing the issue. I hope this bug gets fixed soon :\
Back to top Go down
m27frogy
The Garbageman
m27frogy


Posts : 336
Join date : 2011-06-23

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyOctober 30th 2012, 4:41 pm

That is odd, I'm glad your issue was fixed! PS, you might want to update your avatar. I change d it for you! ;)
Back to top Go down
branefreez
Intermediate Scripter
Intermediate Scripter
branefreez


Posts : 143
Join date : 2012-07-14

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyOctober 31st 2012, 12:45 pm

do

[code]local debounce = true

if (debounce == true) do
blah blah onEquipped blah blah
debounce = false

STUFF................
end
Back to top Go down
http://www.roblox.com/User.aspx?ID=22724483
tgp1994
Intermediate Scripter
Intermediate Scripter
tgp1994


Posts : 17
Join date : 2012-06-27

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyOctober 31st 2012, 1:41 pm

m27frogy wrote:
PS, you might want to update your avatar. I change d it for you! ;)

Oh, was that thing old? I never really noticed, thanks for getting it for me though :)

branefreez wrote:
do

[code]local debounce = true

if (debounce == true) do
blah blah onEquipped blah blah
debounce = false

STUFF................
end

Yeah, it was the weirdest thing... I actually tried the debounce method first (that was the first suggestion over at roblox), and for some reason, (as best as I can remember) I was still getting the same results, more or less. I don't completely understand why that wouldn't work where the wait(0) method would, but I sure like it since it's less code :)
Back to top Go down
m27frogy
The Garbageman
m27frogy


Posts : 336
Join date : 2011-06-23

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyOctober 31st 2012, 2:46 pm

It's sure odd.
Back to top Go down
branefreez
Intermediate Scripter
Intermediate Scripter
branefreez


Posts : 143
Join date : 2012-07-14

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyNovember 1st 2012, 3:27 pm

It is.... But it's nice to know that there are more than just two people active on the forum.
Back to top Go down
http://www.roblox.com/User.aspx?ID=22724483
tgp1994
Intermediate Scripter
Intermediate Scripter
tgp1994


Posts : 17
Join date : 2012-06-27

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyNovember 1st 2012, 5:43 pm

Hate to go offtopic, but is activity an issue here?
Back to top Go down
branefreez
Intermediate Scripter
Intermediate Scripter
branefreez


Posts : 143
Join date : 2012-07-14

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyNovember 1st 2012, 7:16 pm

Nope. Not really, but I was just showing my happiness that you are also active.
Back to top Go down
http://www.roblox.com/User.aspx?ID=22724483
tgp1994
Intermediate Scripter
Intermediate Scripter
tgp1994


Posts : 17
Join date : 2012-06-27

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyNovember 1st 2012, 7:21 pm

Oh, why thank you :) I'm glad to be active here.
Back to top Go down
m27frogy
The Garbageman
m27frogy


Posts : 336
Join date : 2011-06-23

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyNovember 2nd 2012, 12:17 pm

Well, I'll promote you, since I can see you're better than a novice. :D
Back to top Go down
branefreez
Intermediate Scripter
Intermediate Scripter
branefreez


Posts : 143
Join date : 2012-07-14

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyNovember 2nd 2012, 3:04 pm

That's very kind of you to do for him. Thank you! And, Welcome to being a Moderate Scripter, tgp1994!
Back to top Go down
http://www.roblox.com/User.aspx?ID=22724483
tgp1994
Intermediate Scripter
Intermediate Scripter
tgp1994


Posts : 17
Join date : 2012-06-27

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyNovember 2nd 2012, 6:34 pm

Thank you both :) I wish I was more active on ROBLOX to better deserve the title, but I appreciate it nonetheless.
Back to top Go down
branefreez
Intermediate Scripter
Intermediate Scripter
branefreez


Posts : 143
Join date : 2012-07-14

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyNovember 3rd 2012, 2:01 pm

Hey, as long as you are active to some extent, we appreciate it. You are helping to keep the forum alive.
Back to top Go down
http://www.roblox.com/User.aspx?ID=22724483
m27frogy
The Garbageman
m27frogy


Posts : 336
Join date : 2011-06-23

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyNovember 5th 2012, 8:01 pm

Yup. Couldn't have coined it better.
Back to top Go down
MrNicNac
Expert Scripter
Expert Scripter
MrNicNac


Posts : 27
Join date : 2011-03-06
Age : 28

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyNovember 13th 2012, 9:07 am

If you're still having issues with this, I can look at the code for you and definitely give you a fix. I've had problems like this multiple times.
Back to top Go down
branefreez
Intermediate Scripter
Intermediate Scripter
branefreez


Posts : 143
Join date : 2012-07-14

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyNovember 13th 2012, 4:07 pm

Hey, MrNicNac! Nice to see you, again! [Even though I've never met you>:3 ]. I'm sure they would love having your help on their probloems.
Back to top Go down
http://www.roblox.com/User.aspx?ID=22724483
tgp1994
Intermediate Scripter
Intermediate Scripter
tgp1994


Posts : 17
Join date : 2012-06-27

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyNovember 13th 2012, 11:35 pm

I appreciate the offer, MrNicNac! I think the wait command actually worked very well for the script (and for me, I might add :P) If you have a better solution, would you mind posting it here so the community can benefit from it?
Back to top Go down
MrNicNac
Expert Scripter
Expert Scripter
MrNicNac


Posts : 27
Join date : 2011-03-06
Age : 28

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyNovember 14th 2012, 9:21 am

No, my offer would have been to add a wait somewhere as well.

I just have to ask, however, did you use a LocalScript?
Back to top Go down
tgp1994
Intermediate Scripter
Intermediate Scripter
tgp1994


Posts : 17
Join date : 2012-06-27

Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? EmptyNovember 14th 2012, 9:28 pm

MrNicNac wrote:

I just have to ask, however, did you use a LocalScript?

I'm trying to think back... I was going back and forth between a LocalScript and a regular script, because I needed to interact with the world, yet I was hearing stories that the localscript would be a solution (although I don't remember switching to one actually fixing anything). It seemed like it would be much more easier leaving the script as a serverside script, so I think I may have left it serverside.
Back to top Go down
Sponsored content





Why am I exceeding the re-entrancy depth? Empty
PostSubject: Re: Why am I exceeding the re-entrancy depth?   Why am I exceeding the re-entrancy depth? Empty

Back to top Go down
 
Why am I exceeding the re-entrancy depth?
Back to top 
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
A Roblox Community :: Questions and Help :: Scripting-
Jump to: