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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Aekisu
Novice


Joined: 08 Oct 2002
Posts: 34

PostPosted: Thu Sep 25, 2003 2:22 am   

Settings Editor
 
I'm trying to edit (using the Settings Editor) an #alias in a class I created. I can type in the new info but when I press the 'Save' button, the changes disappear and no changes are made. It's like the class is locked and I am prevented from making an changes to the class.

Is this some kind of feature I can turn on and off or is it a bug?
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Sep 30, 2003 7:03 am   
 
I'm unable to duplicate this. Please be more specific:
What is the name of the class?
How did you create it?

What is the name of the alias?
What is the alias script?
How did you create it?

What changes are you trying to make?
Where are you making the changes?
Reply with quote
omaek193
Novice


Joined: 10 Oct 2002
Posts: 30
Location: Italy

PostPosted: Tue Sep 30, 2003 4:21 pm   
 
Try to edit classes in text mode, I experienced similar problems using settings editor, and editing in text mode was the trick.
By the way, any further information can be useful.
Reply with quote
StackAdder
Wanderer


Joined: 30 Sep 2003
Posts: 77
Location: United Kingdom

PostPosted: Tue Sep 30, 2003 4:56 pm   
 
I have been running into this all day :-)
I think if you have any syntax errors (which don't always show up) the changes get discarded.

I had, for example:
#CLASS {clsWho}
#VAR punc {^(%p)$}
#VAR tot {12}
#TRIGGER "who" {who} {#noop nada} "" {notrig|disable}
#COND {^(%p)$} {#noop nada2} {disable}
#COND {} {#if ("%0" =~ "@punc") {#win tells punc}{#win chats nopunc}} {looplines|param=99|disable}
#COND {^(%p)$} {#set 0;#reset who} {skip|param=3|disable}
#TRIGGER "blah" {*} {#if (%0 =~ "@punc") {#win tells punc}{#win chats nopunc}}
#TRIGGER {^(%p)$} {#echo punctuation} "" {disable}
#CLASS 0

and try as I might I cannot get
#VAR punc {^(%p)$}
to read
#VAR punc {^~(%p)$}

even in text mode.
On the off chance I tried changing it to msscript (just to see if it would accept the text changes) - but it then deletes the whole body of the class and renames it to one of my variables (hpmax in this case)
If I change that back to text, paste in the 'corrected' code, it then truncates it to:
#CLASS {clsWho}
#VAR punc {^(%p)$}
#VAR tot {12}
#TRIGGER {^(%p)$} {#echo punctuation} "" {disable}
#CLASS 0
when I save it (even though "#var punc {^~(%p$}" is being pasted in!) - so it is dropping out most of the body (which may well have errors in, but even so it is a little impolite)

Out of interest I cannot get Zugg's example of a multistate trigger 9from the help file) to work - due to a problem with
#IF ((%line =~ @EndLine)|(%concat(%line,"$")=@EndLine))
^syntax error

Database access seems a tad dodgy too - though I am new to it so it may be me (but it won't show a database record unless it has all 'single option' fields set to something? seems fair I suppose, but would be nice if it said so!)

oh zmud 6.62 on XP home if it makes any difference
Reply with quote
StackAdder
Wanderer


Joined: 30 Sep 2003
Posts: 77
Location: United Kingdom

PostPosted: Tue Sep 30, 2003 5:09 pm   
 
Cutting and pasting the lines in one at a time allows me to get this in:
#CLASS {clsWho}
#VAR punc {"^(%p)$"}
#VAR tot {12}
#TRIGGER {^~(%p)$} {#echo punctuation} "" {disable}
#COND {^(%p)$} {#noop nada2} {disable}
#COND {} {#if ("%0" =~ "@punc") {#win tells punc}{#win chats nopunc}} {looplines|param=99|disable}
#COND {^(%p)$} {
#set 0
#reset who
} {skip|param=3|disable}
#CLASS 0
but interestingly won't allow
#TRIGGER {^(%p)$} {#echo punctuation} "" {disable}
in even though (as you can see in previous post) it did allow it before.
(again no biggy really, it is probably dodgy, and I don't actually need it... but it was a part of my vain attempts to debug my who->database script I was trying to write)
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Tue Sep 30, 2003 5:57 pm   
 
It's better to edit your settings individually, rather than in the Class Script.
Reply with quote
StackAdder
Wanderer


Joined: 30 Sep 2003
Posts: 77
Location: United Kingdom

PostPosted: Tue Sep 30, 2003 6:02 pm   
 
I was having slightly more luck with state triggers in class script (due to better syntax checking) than in the trigger dialog, but as i can't get them to work either wayaround I may as well fail in the dialog than in the class script editor I suppose!
Reply with quote
Aekisu
Novice


Joined: 08 Oct 2002
Posts: 34

PostPosted: Tue Sep 30, 2003 8:24 pm   
 
The problem doesn't seem to be related to the actual script. It seems to be related to the editting method, as LightBulb suggested. Since sticking to individual edit and avoiding the class script edit, the problem has not reappeared.
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Wed Oct 01, 2003 1:02 am   
 
That generic multiline capture script in the help file is actually one I wrote. At the time I wrote it the #EXEC command was bugged, which made the script a little clunky. Since has long since been fixed, the script should be changed to use the #EXEC command.

#CLASS {MultiLineCap} {enable}
#VAR StartLine {} {}
#VAR StartCapCommand {} {}
#VAR LineCapCommand {} {}
#VAR EndLine {} {}
#VAR EndCapCommand {} {}
#TRIGGER "CaptureLines" {@StartLine} {#IF (@StartCapCommand) {<"<">@StartCapCommand>}} "" {
disable}
#COND "CaptureLines" {} {#IF ((%line =~ @EndLine)|(%concat(%line,"$")=@EndLine)) {#SET CaptureLines 3 1} {#EXEC @LineCapCommand}} {looplines|param=99|notrig|disable}
#COND "CaptureLines" {} {#NOOP This state is here in case user error caused 99 lines to be captured;#ECHO Warning multiline capture has been active for 99 lines, EndCapCommand not run.;EndCapCommand="";#SET CaptureLines 3 1} {disable}
#COND "CaptureLines" {} {#STATE CaptureLines 0;#RESET MultiLineCap;#T- CaptureLines;#IF (@EndCapCommand) {#EXEC @EndCapCommand}} {manual|disable}
#CLASS 0
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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