Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Wed Oct 01, 2008 10:14 pm   

Wondering if someone can test #ONINPUT for a bug from zMUD
 
In zMUD this code:
#ONINPUT {^idiot savant} {somalias;#GAG;save}
Causes idiot savant to be sent to the MUD instead of just aborting.
Whereas
#ONINPUT {^idiot savant} {somealias;#GAG}
Will work correctly.

Essentially the bug as I see it is that you can't kill an ONINPUT script early based on conditional criteria unless you're false does nothing except send #GAG.
So...
#VAR Test 1
#ONINPUT {^idiot savant} {#IF (@Test < 1) {#GAG} {cast 'somespell'}}
Will fail and send idiot savant to the MUD
While...
#VAR Test 0
#ONINPUT {^idiot savant} {#IF (@Test > 0) {cast 'somespell'}} {#GAG}
Will correctly just dump idiot savant into /dev/null.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Wed Oct 01, 2008 10:15 pm   
 
NOTE: You can't abort out early either or it sends the original pattern still.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Thu Oct 02, 2008 1:41 am   
 
Are you looking to have this tested with zMud or CMud?

If it is zMud, then I would suggest just work around it. Put the #GAG right out front at the top. When you don't actually need the command to have been blocked then use #SEND.

If it is CMud, the correct command would be #NOINPUT, and if it doesn't work in a some cases then it would be a bug for Zugg to fix.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Thu Oct 02, 2008 7:11 am   
 
I've found the bug in zMUD and I want to know if it exists in CMUD so I CAN bring it to Zugg's attention ;)
I'm no yet ready to put CMUD on the new machine however. Sorry for not making this clear.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Thu Oct 02, 2008 9:52 am   
 
I tested the alias;#GAG;command case with this code
Code:
#ONINPUT {^test} {a;#NOINPUT;b};#ALIAS a {#SHOW did a}
test
#ALIAS b {#SHOW did b}
test
It correctly blocked the "test" both times.

Your example of "#IF (@Test < 1) {#GAG} {cast 'somespell'}" is using a value of Test=1. Considering the condition evaluates to false it is correct to not block the "idiot savant". If you want it blocked with both conditions then you should move the #GAG to a different spot, or use #SUB with the second condition to replace the orginal command text.

I took your statement "NOTE: You can't abort out early either or it sends the original pattern still." to mean using #ABORT 1. I tested something similar in CMud with this code:
Code:
#ONINPUT {x} {#NOINPUT;#IF (1) {#EXIT} {test}}
x
The "x" was properly blocked.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Thu Oct 02, 2008 6:18 pm   
 
Thanks Vij, this is just one more reason to upgrade eh? :)
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
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

© 2009 Zugg Software. Hosted by Wolfpaw.net