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 Goto page 1, 2  Next
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Sat May 10, 2008 4:21 am   

[2.25] Problem with turning on a class
 
i have an alias to turn the class on and off
That no longer works.
ie
#al {subon} {#T+ MobSub;#say {Subs Enabled}}
It no longer turns the class on.

sorry, more explanation..
it worked in 2.18
it stopped when i upgraded to 2.25
It doesnt work when typing in #t+ mobsub or by use of a trigger that turns on / off the class
it also isnt the only alias that stopped working like that.
an autoheal script i use also does not work.
ie, the class never gets turned off when it starts healing, the trigger fires several times


Last edited by harley on Sat May 10, 2008 7:11 am; edited 1 time in total
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sat May 10, 2008 5:05 am   
 
First of all, you need to get rid of the {} around the {subon}. Second, not that it should make a difference, but you probably should put {} around MobSub because #T+ can be used for either ID names or Classes. It recognizes ID names in quotes, so change it all to this:

#ALIAS subon {#T+ {MobSub};#SAY Subs Enabled}

That should work. You'll probably need to make the correct changes in all your other scripts, too.

Charneus
Reply with quote
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Sat May 10, 2008 5:37 am   
 
Hmm, ok
That didnt work, I'm not sure what happened :( it appears my #t is broke
Reply with quote
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Sat May 10, 2008 9:02 pm   
 
I'm sorry to be impatient about this :(
Its stopping my ability to play as normal :(
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Sat May 10, 2008 9:10 pm   
 
As far as I know, {}'s aren't valid for using with #t+/-.

You either don't use anything at all, or if there's any troubles or you have to enable something inside one folder that in turn is a part of a larger one, you'd use quotation marks ""'s.

Try

Code:


#alias subon {#t+ MobSub;#say Subs Enabled.}



Or alternatively,

Code:


#alias subon {#t+ "MobSub";#say Subs Enabled.}



If neither work, check

a) aren't you made any typos in names.
b) is the MobSub class a stand-alone class or a subclass (If thats the case, use syntax of #t+ "MainClass|MobSub")

Hope this helps and hopefully I'm not completely wrong because I don't use CMud myself but figured I'd throw my two cents in anyway.


Prog
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Sat May 10, 2008 9:53 pm   
 
The use of {} shouldn't actually matter, but it's worth a shot, I guess.

{} is used to mark an expanded string in the same way as "" marks a literal string. An expanded string is one that contains variables or functions or whatever that should be expanded before the string is sent to wherever it's going.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Sat May 10, 2008 10:50 pm   
 
I appreciate the help guys, I'm thinking i need to reinstall..
Anyways here it goes.
Original
Code:
#T+ {MobSub|Trigger}

That didnt work.. Its not one script its all of them.
Tried
Code:
#T+ MobSub|Trigger

That didnt work
also
Code:
#T+ "MobSub|Trigger"
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sat May 10, 2008 10:59 pm   
 
Is that class buried in other classes?
Reply with quote
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Sun May 11, 2008 12:39 am   
 
Its in the main window
so its
MudName->MobSub->Trigger
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sun May 11, 2008 3:18 am   
 
It's / not |.

Anyway, try this.

Code:
#CLASS MobSub 1
Reply with quote
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Sun May 11, 2008 3:36 am   
 
oldguy2 wrote:
It's / not |.

Anyway, try this.

Code:
#CLASS MobSub 1

That created a new class in the folder specified :(
was
Code:
#class "MobSub|Trigger" 1
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sun May 11, 2008 4:18 am   
 
Umm are you trying to turn on a class or a trigger?

If the class exists already it just enables it. If it doesn't exist then it creates a new one.

Try

#T+ MobSub/Trigger

Although I don't know what Trigger is for...

#Class Mobsub 1 should enable the MobSub class folder that contains your subbing triggers, didn't you say that was what you wanted to do?
Reply with quote
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Sun May 11, 2008 6:06 am   
 
Yes, i'll try #T+ mobsub/trigger
but when i did #class MobSub|Trigger 1
The class i'm trying to turn on is the Trigger Class, the MobSub class is enabled, need the trigger class enabled.
When i try #class MobSub|Trigger 1, it adds another Trigger Class
same with #class "MobSub|Trigger" 1
also
#T+ MobSub/Trigger did not work

Edit:
If noone else is having this problem, i'll reinstall and try that.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sun May 11, 2008 9:40 pm   
 
That's a bad name to use for the name of a class. Most languages have protected keywords.
Reply with quote
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Sun May 11, 2008 11:29 pm   
 
I see, well thats the way that all of my classes work
First to Identify, then set into events/triggers/alias/variables
Keeps everything organized
Reply with quote
Fang Xianfu
GURU


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

PostPosted: Mon May 12, 2008 12:10 am   
 
There's no need to have a separate class just for triggers, though - you can just use the triggers filter if you want to look only at triggers. They're on the far left of the package editor.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Mon May 12, 2008 4:47 am   
 
Yes, but several of my scripts i want the alias's to work but not the triggers, i want the variables to populate, but i dont want things to fire and send things.
so turning off the trigger class seemed like the best idea.

edit, though i could rename it to.. ClassA or whatever.

Damnit:(
I reinstalled cmud 2.25.
Didnt fix the problem..
Still unable to turn off a class, going to try to uninstall and install 2.18 again.
...
Once 2.18 is installed everything works fine. *pout*
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Mon May 12, 2008 6:18 am   
 
I think everyone is probably confused as to why it isn't working for you. Maybe post a screenshot after you enter #T- MobSub on the command line and then open the PE. It should show MobSub class disabled.
Reply with quote
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Mon May 12, 2008 6:50 am   
 
I'll reinstall tomorrow and do this
BTW, Would a 'debugfile' help with this?
or open the #debug window and turn all settings on?
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Mon May 12, 2008 10:29 am   
 
First, temporarily rename the class to something different (Triggers, perhaps). Try using #T on that. If it works then the problem is solved, if not, then:

Try testing #T out on a different class. Create a class called 'Test' and see if you can toggle it on/off.
If you can, then create another class inside it and try again. If you still can, then:
Change the name of the class you just created to 'Trigger' and try #T on it as well.

If it all works in testing, then the problem is probably a corrupted package file. To fix this, export the whole package to xml, with file>export to xml
(Also backup the package file just in case. Can't backup too many times.)

Remove the package from your session. Perhaps even create a new session for this. Or a fresh install of CMUD..

Create a blank package, and import the xml file to this package. Test again to see if it works.
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Mon May 12, 2008 12:35 pm   Re: [2.25] Problem with turning on a class
 
harley wrote:

it worked in 2.18
it stopped when i upgraded to 2.25

Do as Caled suggested. 2.25 is worth a clean install, not an upgrade from 2.18. In my case upgraded 2.25 had a joy in duplicating of control variable for a button (two variables co-exists in the same class! CMUD drives me crazy as there was no other references to that variable!) Exporting all settings to the XML and importing them in clean 2.25 fix that. So do a clean install first.
Reply with quote
harley
Apprentice


Joined: 05 Apr 2008
Posts: 121

PostPosted: Sat May 31, 2008 5:42 pm   
 
Alright, I had some time to play with this again.
(been using 2.18 since last notice)
Unable to fix the problem.
I exported whole package to xml.
Cleared all sessions and created a new one.
Then imported
Getting the same results..
Any other ideas (I've already changed all of the Trigger Class names to Triggs, I hope this isnt protected as well.)
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Sat May 31, 2008 8:48 pm   
 
OK, there is no obvious reason why your #T+/- shouldn't work. Do as you did before, that is, start with a new package and just load in to it the minimum to test the problem. I would imagine that would be 1 trigger and 1 alias. Let's see if that works or doesn't. Also, try turning the trigger on and off from the command line, to cover all bases. Then we can go from there. Make sure that when you place the trigger in the clean package the id field is filled in the Settings Editor.

NOTE: On the subject of #T+/- {triggerid}: Unless you are producing the id dynamically, all this will accomplish is that CMUD will do a little extra work figuring out that it has nothing to do since a literal string evaluates to itself.
_________________
Sic itur ad astra.
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Sat May 31, 2008 9:08 pm   
 
To be honest, I started experiencing this problem today. Don't know what it is, but it's not working.

I have a top level class folder named Autohunt. Within that folder, I have several other class folders. One of them being Hunt. Now, if I type #T+ Autohunt|Hunt, #T+ {Autohunt|Hunt}, or any other variation, it does not enable the class. After doing some digging, I found the reason, and probably a possible bug.

Harley, if you're still having trouble, check this:

Open up your package editor. Choose the folder that is NOT enabling. On the first tab, you should see a checkbox for "Sub menu setting." If you do not, then click the "More +" button near the bottom to expand the advanced options list. Check that box if it's not checked already. It should work from then on.

I would figure this to be a default action - it's within a class anyway, is it not?

Charneus

Edit: Apparently this does not have to remain checked... because I just unchecked it, and it still continued to work... something odd. :\
Reply with quote
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: Sat May 31, 2008 9:23 pm   
 
Interesting you mentioned that, Charneus. I have experienced the problem from time to time with the same type of script (one for hunting and one for picking locks) and I assumed that the problem was that the triggers that turn the classes on and off were being passed over for some reason (maybe too much MUD output at the time since I sometimes have 15 or so spell triggers go off at once?), at other times, the trigger class would enable itself for no apparent reason. Maybe this explains it.
_________________
Sic itur ad astra.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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