TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

#return

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion
View previous topic :: View next topic  
Author Message
tlund



Joined: 27 Jun 2014
Posts: 17

PostPosted: Thu Jul 03, 2014 2:16 pm    Post subject: #return Reply with quote

Code:
#event {RECEIVED LINE} {
        #regexp {%1} {^%+} {
                #echo {LINE: %1};
                #line gag;
                #return;
                #echo {did not exit regexp};
        };
        #echo {did not return};
};

the #return in this example stops execution of the #regexp command, but it does not stop execution of #event. Is there a way to completely stop processing of the current #action or #event, no matter how deeply nested you happen to be at the moment?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sat Jul 05, 2014 7:45 am    Post subject: Reply with quote

#return doesn't work within #regex, might fix that one day. You could use #if instead.
Back to top
View user's profile Send private message Send e-mail
tlund



Joined: 27 Jun 2014
Posts: 17

PostPosted: Sun Jul 06, 2014 3:25 am    Post subject: Reply with quote

If I change it to #if, will the #return exit out of the #event as well?
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sun Jul 06, 2014 7:28 am    Post subject: Reply with quote

It will.
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> General Discussion All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group