Alexandria Uptime: 134.25 Days
Total players online: 3



Take the Tour | Site Map

It is currently Wed Aug 21, 2019 11:02 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Jul 29, 2019 6:56 pm 
Offline
Legendary Scripter
Legendary Scripter
User avatar

Joined: 08/14/2003 22:06
Posts: 1770
Location: Sacramento California

this is the second script ive made where this has happened

when the sub returns, it goes to the very top of the script, instead of returning.



I made a video https://youtu.be/iRLvScPUzS0

_________________
Confusion Dungeon: The only dungeon designed and created by Nilmer.
Visit it on the official Easyuo Shard:
http://www.easyuo.com/forum/viewtopic.php?t=12464

What I do Outside of uo:
http://www.isoawesome.com


Top
  ProfileShow poster's scripts in the public script library 
PostPosted: Tue Jul 30, 2019 6:13 am 
Offline
Developer
Developer
User avatar

Joined: 06/29/2003 11:05
Posts: 2488

This will happen if you goto out of a sub instead of leaving it with return. Cound the numbers of successful calls until it starts to fail. Should be around 1000 as that is the hardcoded recursion limit.


Top
  ProfileShow poster's scripts in the public script library 
PostPosted: Tue Jul 30, 2019 8:37 am 
Offline
Legendary Scripter
Legendary Scripter
User avatar

Joined: 08/14/2003 22:06
Posts: 1770
Location: Sacramento California

that is very helpful info thank you.


I Do not have goto's leaving my subs, but i do have Goto's within my subs to create loops. this will have the same issue?

_________________
Confusion Dungeon: The only dungeon designed and created by Nilmer.
Visit it on the official Easyuo Shard:
http://www.easyuo.com/forum/viewtopic.php?t=12464

What I do Outside of uo:
http://www.isoawesome.com


Top
  ProfileShow poster's scripts in the public script library 
PostPosted: Wed Jul 31, 2019 1:13 am 
Offline
Developer
Developer
User avatar

Joined: 06/29/2003 11:05
Posts: 2488

Only if it leads to the sub being entered more than getting left via return. Every time you enter a sub, some memory is reserved for the jump back. That goes up to 1000 times, after which you are booted to the start of the script.

Set a counter variable at the top of your script to 0. Increment it each time you enter the sub. Decrement it every time you leave this sub via return. If the counter goes bejond 1000 you're in trouble.


Top
  ProfileShow poster's scripts in the public script library 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Hosted by CalWeb Internet Services, Inc.