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
Talonnb1
Beginner


Joined: 14 Apr 2006
Posts: 11

PostPosted: 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}
Reply with quote
Talonnb1
Beginner


Joined: 14 Apr 2006
Posts: 11

PostPosted: 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
}
Reply with quote
Tech
GURU


Joined: 18 Oct 2000
Posts: 2733
Location: Atlanta, USA

PostPosted: 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!
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: 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.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Larkin
Wizard


Joined: 25 Mar 2003
Posts: 1113
Location: USA

PostPosted: 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
}
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