 |
Aleron Wanderer
Joined: 01 Aug 2005 Posts: 76
|
Posted: Wed Feb 01, 2006 4:22 pm
Auto-Indenting |
Perhaps auto-indenting could be fixed for CMUD? At the moment, I have all kinds of auto-indenting problems with zMUD (i.e., things are idented incorrectly and inconsistently), especially with large triggers/aliases containing nested blocks.
|
|
|
 |
TonDiening GURU

Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Wed Feb 01, 2006 4:34 pm |
Probably a good idea to post examples of where the formatting breaks down as examples.
I know on my slower computers if I interrupt the auto-indenting the indenter can eat some of the script after the change. As if I interrupt the re-ordering of it and it chops things after the line I'm changing while its autoformatting. |
|
|
 |
Aleron Wanderer
Joined: 01 Aug 2005 Posts: 76
|
Posted: Wed Feb 01, 2006 4:55 pm |
Sure. Here is an example trigger from a script I wrote recently, I'll just give you the code for the trigger, as it is formatted by zMUD at the moment:
Code: |
#IF (@botState = 4) {
#IF (@killedJormleif = 1) {
#MATH thisRunTime %ctime-@runStartTime
#SAY Run Time: @thisRunTime seconds
#MATH totalRunTime @totalRunTime+@thisRunTime
#IF (@bestRunTime > @thisRunTime) {#VAR bestRunTime @thisRunTime}
} {#ADD numNoRepopRuns 1}
#VAR botState "at repop"
#IF (@movePoints < 300) {sleep}
#TSET 200
#TI 1 {startRun}
} |
If I understand how zMUD is supposed to be auto-indenting this, its all screwed up. I just rewrote it (as in, retyped, not copy/paste) this trigger, and it still formats it this way. This is how I expect it should be formatting it (correct me if I am wrong):
Code: |
#IF (@botState = 4) {
#IF (@killedJormleif = 1) {
#MATH thisRunTime %ctime-@runStartTime
#SAY Run Time: @thisRunTime seconds
#MATH totalRunTime @totalRunTime+@thisRunTime
#IF (@bestRunTime > @thisRunTime) {#VAR bestRunTime @thisRunTime}
} {#ADD numNoRepopRuns 1}
#VAR botState "at repop"
#IF (@movePoints < 300) {sleep}
#TSET 200
#TI 1 {startRun}
} |
Computer speed isn't an issue. I see the same problems on my machine at work (2.4GHz), on my laptop (2GHz), and at home (3.1GHz). |
|
|
 |
Rainchild Wizard

Joined: 10 Oct 2000 Posts: 1551 Location: Australia
|
Posted: Wed Feb 01, 2006 9:18 pm |
Code: |
#IF (@botState = 4)
{
#IF (@killedJormleif = 1)
{
#MATH thisRunTime %ctime-@runStartTime
#SAY Run Time: @thisRunTime seconds
#MATH totalRunTime @totalRunTime+@thisRunTime
#IF (@bestRunTime > @thisRunTime)
{
#VAR bestRunTime @thisRunTime
}
} {
#ADD numNoRepopRuns 1
}
#VAR botState "at repop"
#IF (@movePoints < 300)
{
sleep
}
#TSET 200
#TI 1 {startRun}
} |
Would be my preference, though I have a feeling the open { might have to be on the same line as the #IF |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Wed Feb 01, 2006 10:00 pm |
There will not be any auto-indenting in the Settings Editor. It will stay exactly how you typed it in. Read Zugg's preliminary announcements when the CMud forums were first opened (he might even have them stickied), I know he said as much in one of them.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Feb 02, 2006 7:20 pm |
Yep, Matt is correct. No "Pretty Printing" in CMUD, at least to start with.
|
|
|
 |
Aleron Wanderer
Joined: 01 Aug 2005 Posts: 76
|
Posted: Thu Feb 02, 2006 7:41 pm |
Thanks for verifying, I looked for the referenced thread but couldn't find it.
|
|
|
 |
|
|