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

Joined: 29 May 2020
Posts: 5

PostPosted: Thu Mar 09, 2023 4:41 pm   

Help with Classes.
Sometimes multiple versions of the same variable gets made, basically whatever class CMUD decides its default at. I have an idea of maybe how to deal with this, but I'm not sure what the exact format is or how the class pathing works in CMUD.

I've seen examples of code from other people which write code as.

#var examplecode 1 {} {Directory1} {Directory 2}

so it know's exactly which pathing to overwrite or retrieve the variable. However I can't seem to find in the helpfile's easily how the brackets {} work. Is the first bracket root directory? followed by each class proceeding it?

Also sometimes when I'm running a script, random variables seem to be stored incorrectly. So I'm hoping I can do a better job with memory allocation on CMUD, so it doesn't crash or bug on me so often.
I've had issues with CMUD where everything works fine, then all of a sudden all the alias stop working.
Reply with quote

Joined: 04 Aug 2002
Posts: 4682
Location: Pensacola, FL, USA

PostPosted: Thu Mar 09, 2023 6:45 pm   
#VAR name {value} {default value} {class}
Is the expected long-form way to define a variable

You should not be specifying two directories like that.
If you want it stored in two places you should make two declarations.
Assuming its a subclass, with no default value, long-form would be:

#VAR name {value} _nodef {class|subclass|etc}

If that is still not working, it is likely an issue of package corruption.
Discord: Shalimarwildcat
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