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


Joined: 24 Jun 2008
Posts: 16

PostPosted: Mon Oct 27, 2008 4:21 pm   

[CMUD 2.36] Partial Trigger matching in Settings Editor prevents new trigger...
 
Adding new curing lines and when I attempt to add two triggers:

Jumping straight up into the air, * snaps a kick at you and slams a heel into your left arm, popping the limb out of its socket.

Jumping straight up into the air, * snaps a kick at you and slams a heel into your right arm, popping the limb out of its socket.

It tells me that I cannot save the second one because a trigger with the same capture already exists. It seems to stop parsing the trigger for a duplicate at "slam", which is where the formatting ends for the trigger list in settings editor no matter how wide I make the pane.

Yes, I realize that I can combine the trigger into {left|right}, that doesn't change the fact that I have various other triggers just like this and that the trigger line is NOT the same and it's still throwing up that error.
Reply with quote
Arminas
Wizard


Joined: 11 Jul 2002
Posts: 1265
Location: USA

PostPosted: Mon Oct 27, 2008 4:36 pm   
 
Just do the rename that it is asking you to do. It will still match the correct pattern.

This name that it is talking about isn't actually the pattern. You could name it JumpKick if you wanted to and it would still work.
_________________
Arminas, The Invisible horseman
Windows 7 Pro 32 bit
AMD 64 X2 2.51 Dual Core, 2 GB of Ram
Reply with quote
Sintor
Beginner


Joined: 24 Jun 2008
Posts: 16

PostPosted: Mon Oct 27, 2008 4:43 pm   
 
Worked, thanks. Is it just failing to parse the short name of it or something?
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Oct 27, 2008 5:11 pm   
 
A database can only index the first 64 characters of a string (at least that was the case in SQLite 2.8). So if the first 64 characters are not unique, then you need to enter a unique short ID value to make each trigger different. By default when you don't use a short ID name, CMUD is trying to use the full pattern as the trigger name.
Reply with quote
Sintor
Beginner


Joined: 24 Jun 2008
Posts: 16

PostPosted: Mon Oct 27, 2008 6:06 pm   
 
Ah, ok. It just seemed very odd to me since I had done a similar set of triggers this weekend and it didn't prompt for the rename.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Tue Oct 28, 2008 6:49 pm   
 
I've got a feeling I have many triggers with the same first 64 characters (imported from zMUD), although I haven't checked - is this possible? And if it is possible, does the Compatibility Report pick these 'duplicates' up? If not (I have not seen it do so), it should do. What are the consequences if one does have duplicate short IDs for triggers? A slow down?
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Oct 28, 2008 8:03 pm   
 
There shouldn't be any slowdown and they should still import from zMUD just fine. The problem is if you try to disable a trigger using #T- or delete it with #UNTRIG then CMUD might delete the wrong trigger if you have duplicate IDs. The compatibility report doesn't currently catch this, but it's a good idea for the future. But the triggers will still work regardless.

If you try to edit one of these triggers like Sintor did in his original post, then when you try to save the changes you will get the warning about the duplicate and will be forced to give it a unique name at that time.
Reply with quote
Seb
Wizard


Joined: 14 Aug 2004
Posts: 1269

PostPosted: Tue Oct 28, 2008 8:15 pm   
 
OK, cheers for the info.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Wed Oct 29, 2008 9:10 am   
 
You might consider giving all of your triggers descriptive IDs. You can do what you want of course, but it makes it a hundred times easier to search through them anyway. Like those two trigger examples you could label brokenLeftArm and brokenRightArm for example.
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