Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
noddio
Beginner


Joined: 17 Jul 2008
Posts: 11

PostPosted: Mon Jun 08, 2009 4:24 am   

#alarm with class?
 
hi
since my friend told me #wa is easy to get some problem , i change all my #wa to #alarm
also my friend said, it's better to make a class for each #alarm
for example: #alarm (+2) {say hi} timer
when this alarm is exxcuting, a class call "timer" will be created
i know this alarm will self delete after execute 1 time
but doesnt class "timer" wont self delete also?
my friend said, in his zmud , the class will self delete, how come mine wont?
Reply with quote
shalimar
GURU


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

PostPosted: Mon Jun 08, 2009 6:40 pm   
 
No the class will not autodestroy, you can #UNCLASS it though.
_________________
Discord: Shalimarwildcat
Reply with quote
noddio
Beginner


Joined: 17 Jul 2008
Posts: 11

PostPosted: Tue Jun 09, 2009 3:33 am   
 
yeah , i think that way,too
but i just ased friend, the answer still the same, he said his class auto auto delete after alarm trigger delete
finally , i decide not to destroy any class, i just puted them in a class
otherwise, create class, delete class, repeate those cmd several times in few sec may affect program
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Tue Jun 09, 2009 11:33 pm   
 
#T+ timer
#alarm (+2) {say hi;#T- timer} timer
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Wed Jun 10, 2009 11:53 pm   
 
Or, better yet... don't class them all. Name them all.

#ALARM "Timer" (+2) {whatever stuff here}

EDIT: Oops, forgot the rest of my point...

Have all of these in a single class, called "TempAlarms"
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
noddio
Beginner


Joined: 17 Jul 2008
Posts: 11

PostPosted: Thu Jun 11, 2009 2:58 am   
 
i didn't class them be4, and some alarm can't work
i dunno why, a example, i put alarm in a trigger, after this trigger execute alarm will #t- this trigger and open after 5 sec
but in fact, trigger off, 5 sec after wont turn on
so i class it, then it's working now
also, some alarm i use same class, and it can't work
but change to another name of class of that alarm and it works
but another friend said, he never class alarm , but no problem at all
dunno why ,so confuse
any point i have to take care for creatting an alarm?
Reply with quote
ralgith
Sorcerer


Joined: 13 Jan 2006
Posts: 715

PostPosted: Fri Jun 12, 2009 3:48 am   
 
Not to be rude, but you're giving me a headache because you have a severe case of ESL (English Second Language) going on. I'm sorry, but I really don't know what the heck you're trying to say there.

The only way you'll have problems with multiple alarms in the same class folder is if you don't name them like I said to do. You should ALWAYS name your alarms. Always.
_________________
CrossOver: Windows Compatibility on Mac and Linux CMUD Advocate
Reply with quote
TimTam
Newbie


Joined: 09 Oct 2008
Posts: 7

PostPosted: Mon Jun 22, 2009 6:15 am   
 
What's the difference between naming and classing?

Also what are the advantages of one over the other?
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon Jun 22, 2009 1:27 pm   
 
Organisation, basically. Using classes allows you batch your enable/disable commands, by putting things you want to control together into a single class. It also makes it easier to identify which settings belong to which part of your scripts (especially if you name your variables things like "string" and "temp") by giving you a container for all your related settings. There's also some nifty on-enable and on-disable scripting stuff you can do with classes in the latest version of CMUD, but those features aren't in zMUD.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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