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
TesterOfLimitz
Novice


Joined: 02 Jun 2007
Posts: 37

PostPosted: Tue Jul 17, 2007 5:44 am   

Randomly Reassigning Priority?!
 
I was working through my healing system, coding a few basic multistate triggers. I went to create a new state within the settings editor (New --> New Trigger State) and CMUD randomly starts scrolling through all of my triggers, then stops.

So I kick the tires a little bit trying to figure out what happened, and it seems everything works as it should (At least that which I've tested) EXCEPT a trigger I use to color a Subbed command. The priority had been changed so the coloring trigger fired off BEFORE the actual #sub trigger, leaving the sub to do its work but not actually coloring it,

Changing the priority of the two triggers worked fine, but Cmud Randomly changing the priority in the first place kinda worries me.

Has anyone else had this happen to them? Or any Idea's as to what actually caused it to happen in the first place?
Reply with quote
forren
Novice


Joined: 26 Apr 2007
Posts: 44

PostPosted: Tue Jul 17, 2007 12:45 pm   
 
Finally, someone else who has the same problem as me.

I emailed Zugg with my .pkg and had a thread about this two or three weeks ago. The problem occurs for me when I click new trigger state while on the 4th or 5th state out of seven or eight.

Can we narrow down exactly what conditions cause this?

Edit: Link to my thread - http://forums.zuggsoft.com/forums/viewtopic.php?t=27666
Reply with quote
Caled
Sorcerer


Joined: 21 Oct 2000
Posts: 821
Location: Australia

PostPosted: Tue Jul 17, 2007 10:58 pm   
 
I think I had similar last night. Also with #sub. I created two triggers one after the other, and for some reason the first got a 4-digit priority number, while the second got a 3-digit one. I didn't think it was due to the sub though, it was me trying to save time by using copy/paste on an existing trigger that I was only going to modify slightly.
_________________
Athlon 64 3200+
Win XP Pro x64
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Jul 18, 2007 2:24 am   
 
When you copy/paste a trigger, the new trigger has a new priority. CMUD sets a default priority of "Index*10" where "Index" is essentially the number of triggers. Each time a trigger is added, this Index is incremented. So, the 14th trigger added will have a default priority of "140".

When you copy/paste a trigger, you are creating a *new* trigger. So the priority of this trigger gets set to the default. The priority of the trigger being copy/pasted is not copied to the new trigger.

Now, when you insert this as a substate of an existing trigger, the priority becomes the state index. The first state of a trigger has the lowest priority, etc. When you insert a new trigger state, all of the states after that are renumbered so that they have a higher priority number.

Anyway, that's how it is *supposed* to work. It's possible there is a copy/paste bug because of some problem with the XML format. But the second trigger *should* have gotten a larger priority number. Hopefully with this extra information you'll be able to pin down more about what is causing the problem. I haven't had a chance to look at the pkg that forren sent me yet, but it's on my (long) bug list.
Reply with quote
TesterOfLimitz
Novice


Joined: 02 Jun 2007
Posts: 37

PostPosted: Wed Jul 18, 2007 6:43 pm   
 
Thats how I thought it would work, but, in stead it cycled through ALL of my triggers and reprioritzed them. Ive had it happen twice to me since then, each time I was simply clicking New --> New Trigger State button. Also the new triggers I make have a priority of 237010 (or at least the last trigger I made did) and I KNOW there arnt 23701 triggers in my system Shocked
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Jul 18, 2007 9:55 pm   
 
Quote:
Also the new triggers I make have a priority of 237010

OK, that's definitely indicating a problem. Looks like an uninitialized variable somewhere. Well, like I said, it's on the bug list.
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