 |
Talonnb1 Beginner
Joined: 14 Apr 2006 Posts: 11
|
Posted: Thu Feb 08, 2007 6:40 am
Coding Script Layout - How to change it? |
When I was programming with Zmud, it had a nice little feature that would layer the code based on if's and ; but with Cmud, unless I'm missing a feature or layout setup, I can't find how to change it so it looks like I like.
example:
#if (@notarget = 1) {#var notarget 0;#var tar %1;#echo New target is a artist: %1;#if (@newroom = 1) {scs;#var newroom 0};aa}
prefered:
#if (@notarget = 1) {
#var notarget 0;#var tar %1;#echo New target is a artist: %1;#if (@newroom = 1) {scs;#var newroom 0};aa} |
|
|
 |
Talonnb1 Beginner
Joined: 14 Apr 2006 Posts: 11
|
Posted: Thu Feb 08, 2007 6:41 am |
gah, didn't let me add the whole for prefered:
#if (@notarget = 1) {
#var notarget 0
#var tar %1
#echo New target is a artist: %1
#if (@newroom = 1) {
scs
#var newroom 0
}
aa
} |
|
|
 |
Tech GURU

Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Thu Feb 08, 2007 7:20 am |
I believe you are referring to the Pretty Printing option.
This feature has been much discussed in other threads (can't find the link right now) but that option is no longer available in CMUD in favor of having manual indentation and multiline code segments. Zugg has mentioned that he will consider including an auto-format option activated by hot key, but this is not set in stone yet. |
|
_________________ Asati di tempari! |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Thu Feb 08, 2007 10:15 am |
And, indeed, even if it's been decided it's not in yet. But you can make the code look however you like yourself - just remember that to make CMUD ignore a newline and not interpret it as the start of a new command, indent the line two spaces.
|
|
|
 |
Larkin Wizard

Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Thu Feb 08, 2007 12:27 pm |
Your preferred version will give compilation errors, actually. You need to indent things at least one space for it to be in the proper "sub-scope," if you will.
Code: |
#if (@notarget = 1) {
#var notarget 0
#var tar %1
#echo New target is an artist: %1
#if (@newroom = 1) {
scs
#var newroom 0
}
aa
} |
|
|
|
 |
|
|