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
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Mon Sep 06, 2010 11:10 am   

Pipes in Class name
 
I use Pouring|DataGroup for variables. The declaration is #class Pouring|Datagroup. To return I use #class 0

CMud created my OrderDB variable outside the Pouring folder. I have been unsure about the pipes since day one. Otherwise what am I missing?

I declared the order within a conditional though, partway through a script. I had just changed it to #var OrderDB "" {_nodef} {Pouring|DataGroup} but now wonder if I need to declare it early.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Mon Sep 06, 2010 3:59 pm   
 
The pipes are from the old, ZMud way of class pathing. Aside from possibly needing some sort of brackets around them, I don't know that there's anything syntactically wrong in your use of them. In CMud (and I don't remember if this was different or not yet implemented in 2.37), there's an alternative pathing scheme:

//module name/class name/.../variable name

This can be used in many more places in your code, and while it does make each line longer CMud never deviates from that specific variable.
_________________
EDIT: I didn't like my old signature
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Mon Sep 06, 2010 5:59 pm   
 
Normally in ZMud I would just export the whole settings to text and replace the pipes into slants, but in CMud I see the export is XML. An XML file can not be edited as plain text, I think. How would I do a replace in XML, or where would I find out how to make XML text files?

Another database just was created outside its target folder. I had already re-installed, but I must have a bad install, or damaged a data file when I crashed trying to import Achaean Curing Project codes. I want to see about fixing ACP, but that might be a bad idea. Are there any files that could make CMud confused?
Reply with quote
Martaigne
Wanderer


Joined: 05 Jan 2002
Posts: 88
Location: Atlanta, GA

PostPosted: Mon Sep 06, 2010 8:34 pm   
 
XML is text, you can even open it in something as simple as Notepad. I recommend Notepad++ for XML editing.
_________________
Unwritten Legends
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Mon Sep 06, 2010 8:37 pm   
 
nothing like 'find in all open documents' and end line replacing
Reply with quote
hogarius
Adept


Joined: 29 Jan 2003
Posts: 221
Location: islands.genesismuds.org

PostPosted: Tue Sep 07, 2010 2:40 am   
 
Letia, TextPad is another Notepad alternative that may have the features you are asking about.
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Tue Sep 07, 2010 4:19 am   
 
Notepad does that, I was agreeing. I've used it for years, it's helped my codes since it matched brackets. Also it's nice for logs.

I tried the Pouring/DataBase syntax and it doesn't work. This error is very bad. I am thinking about not mudding.
Reply with quote
robecks
Beginner


Joined: 22 Jun 2010
Posts: 17

PostPosted: Tue Sep 07, 2010 5:31 am   
 
i use dreamweaver to edit my xml
Reply with quote
Leitia
Adept


Joined: 04 May 2007
Posts: 292
Location: Boston

PostPosted: Tue Sep 07, 2010 1:40 pm   
 
By deleting many files, I see that my DB is broken. Cool, that I can fix.

I think what must be happening ZMud on return to a main script from a subroutine returned to the main script's class, so I wrote my code for that. CMud keeps the subroutines class statement.

What seems broke is using the dot convention; as such @PotionAI.prefix1 is unpredictable and I have to call %db(@PotionAI,prefix1). I used a lot of the former.

%format is very different, and since all my scripts use %format I am deleting a lot of tilde and adding quotes.


I just noticed the CMud code slash are unix style while the slash at the top of the editor tree are windows style. What we need then is an animated windshield wiper to say anything goes. That imagery is killing me.
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