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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum Goto page 1, 2  Next
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Mon Nov 02, 2009 9:59 pm   

[3.12] Variables being created/modified at wrong location
 
Hi again all

I have a number of script running at same time when I get this problem. One script, which one toggles a class constantly, on and off. For some reason, sometimes... All variables being used / worked with /modified by ANY script... are stored in that class that is being toggled. Whenever that happens... EVERYTHING gets screwed. The thing is that I have all those variables already, in the <none> folder... root... and those should be modified, accessed, worked with... but for some reason...
Also, when I've had 2 running scripts, that have toggled a class, variables have been stored in BOTH of those classes. The other one was the MapCapture script I posted about earlier in a different thread, but I managed to get rid of that toggling...

Has this happened to anyone?
Is this a known problem?
Does anyone have any idea on how to solve it?

Sorry for the spam (3 posts in a row) but I'm really trying to go from zMUD to CMUD... but I need help.

With regards

//DanteX
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Nov 03, 2009 1:36 pm   
 
Can you show us the scripts you are using which toggle these classes? And one or two that are causing variables to be created in the wrong place? I frequently toggle classes and have not had a problem lilke this in previous versions, so either 3.12 has a new bug, or something in your scripts is messing things up.
Reply with quote
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Tue Nov 03, 2009 3:56 pm   
 
I cannot say what messes the variables up exacly, that's what I'm trying to find out.

What I have seen in at least 4 different scripts that do simple map toggling, such as a tracker of dbl-exp, posted below. The variables end up in the "TrackOn" folder instead of <none>. This is really a huge issue for me, since it makes my settings unusable, with various scripts flipping out with endless loops due to the script apparently READING the variable from one location, but WRITING it to the other.

for example:

#FOR @varname {do this}
varname=0

stucks in an endless loop where "do this" is repeated endlessly because "varname" has the value 0 at the CORRECT location, but more than 0 at the wrong one.

This problem makes CMUD unusable for me, because it seems to pop up randomly.

All scripts that are being run, store the variables at the wrong location, both in variables in DB format and regular @-acessed. When I look at the variables, it SEEMS as they are accessed / written from triggers, all of them... and not from Aliases.

Also, I can confirm the following: when I have another window marked, not the main... DB-variables get cleared, as the thread seems to be executed in that window. But i'll post this separately. I have seen this happen when aliases that include #WAIT are executed as I have another window marked. The thread created when the alias is executed is run in the marked window according to the #THREAD command, which screws variables.


<class name="DoubleTracker" id="52">
<class name="TrackOn" enabled="false" id="53">
<trigger priority="30510" id="3051">
<pattern>^You receive (%d) bonus experience points in honor of (%w) reaching superhero.$</pattern>
<value>#ad dblxp %1;#ad dblxp %1</value>
</trigger>
<trigger priority="30520" id="3052">
<pattern>^INFO: Bonus experience has now expired.$</pattern>
<value>#SAY %ansi( high, green)-=+ %ansi( high, cyan)Double Tracker Ended! %ansi( high, green)+=-
#MATH adblxp {@dblxp / 2} {GroupInfo|DoubleTracker}
dblavgxp={%eval( @dblxp/@dbltime).%eval( (( @dblxp\@dbltime) * 100)/@dbltime)}
oadblxp={@adblxp}
odblxp={@dblxp}
odbltime={@dbltime}
odblavgxp={@dblavgxp}
doubleinfo={@doubleinfotmp}
#ALARM +2 {
lastdbl
#IF (@explink = 1) {expcom gt}
}
#T- {GroupInfo|DoubleTracker|TrackOn}</value>
</trigger>
<trigger priority="30530" id="3053">
<pattern>^You receive (%d) bonus experience points courtesy of (%w).$</pattern>
<value>#ad dblxp %1;#ad dblxp %1</value>
</trigger>
<trigger priority="30540" id="3054">
<pattern>^INFO: 5 minutes remaining of bonus experience.$</pattern>
<value>thisdbl echo</value>
</trigger>
<trigger priority="30550" id="3055">
<pattern>^INFO: 1 minute remaining of bonus experience.$</pattern>
<value>#say %ansi( high, green)-=+ %ansi( high, yellow)1 minute left of Bonus Exp!! %ansi( high, green)+=-;thisdbl echo</value>
</trigger>
<trigger priority="30560" id="3056">
<pattern>^You receive (%d) bonus experience points to rejoice in the death of another million mobs.$</pattern>
<value>#ad dblxp %1;#ad dblxp %1</value>
</trigger>
<trigger priority="30570" id="3057">
<pattern>^You receive (%d) bonus experience points courtesy of Aardwolf supporters ~-see help donate.$</pattern>
<value>#ad dblxp %1;#ad dblxp %1</value>
</trigger>
<trigger name="_Alarm23" type="Alarm" priority="63730" id="6373">
<pattern>+0.15</pattern>
<value> #T- MobSub
#IF (%class( BotTest)) {
#ADDKEY BVar CmcSent 1
; #SHOW cmc exit
cmc
}</value>
</trigger>
</class>
<alias name="LastDbl" autoappend="true" id="625">
<value>#MATH oadblxp {@odblxp / 2} {GroupInfo|DoubleTracker}
odblavgxp={%eval( @odblxp/@odbltime).%eval( (( @odblxp\@odbltime) * 100)/@odbltime)}
#IF (%0) {%0 ~@RL~@rast ~@RD~@rouble~@W: ~@W@odblxp ~@C~(~@W@oadblxp ~@cBonus~@C~) ~@cXp Earned In ~@W@odbltime ~@cMinutes~@W. ~@W@odblavgxp ~@cXp~@C/~@cMinute~@W. ~@WLast @doubleinfo~@Y~.} {@dblchan ~@RL~@rast ~@RD~@rouble~@W: ~@W@odblxp ~@C~(~@W@oadblxp ~@cBonus~@C~) ~@cXp Earned In ~@W@odbltime ~@cMinutes~@W. ~@W@odblavgxp ~@cXp~@C/~@cMinute~@W. ~@WLast @doubleinfo~@Y~.}</value>
</alias>
<alias name="ThisDbl" autoappend="true" id="626">
<value>#IF (%class( GroupInfo|DoubleTracker|TrackOn)) {#IF (%0) {%0 ~@W@dblxp ~@cXp Earned So Far This Double~@W.} {@dblchan ~@W@dblxp ~@cXp Earned So Far This Double~@W.}} {lastdbl}</value>
</alias>
<alias name="DblHelp" autoappend="true" id="627">
<value>#say %ansi( high, white)~/~/ Double Tracker v1.41 Written by Atreidess ~\~\
#say %ansi( grey)" "~/~/ Colorizing by Davos ~\~\
#say
#say %ansi( high, cyan)This script the following commands:
#say %ansi( high, green)-~=: DTrackOn (X)" ":~=-%ansi( high, yellow) Enables double tracker manually. (X) is for duration ~(default is 10~).
#say %ansi( high, green)-~=: LastDbl (X)" " :~=-%ansi( high, yellow) Displays complete info about last double
#say %ansi( high, green)-~=: ThisDbl (X)" " :~=-%ansi( high, yellow) Displays info about this double ~(if one is active, otherwise shows last double~).
#say %ansi( high, green)-~=: ThisDbli (X) :~=-%ansi( high, yellow) Displays info about the type of last double.
#say %ansi( high, green)-~=: DAlert" ":~=-%ansi( high, yellow) Used to toggle double notifcations ~(Audible, Visual, Both, or None~)
#say %ansi( high, green)-~=: DblC" ":~=-%ansi( high, yellow) Used to set the default channel for the script to report on.
#say %ansi( high, red)~* (X) is the channel you wish to display the info on ~(default is group tells~).
#say
#say %ansi( high, green)-~=: PTSet" ":~=-%ansi( high, yellow) Use this to set groupie for ExpComare Linking.
#say %ansi( high, Green)-~=: This script currently tracks doubles from :~=-
#say %ansi( high, Yellow)-~=: Superhero Loud, Christmas Cards, 1 Million Mob Deaths, ~*Donations :~=-
#say %ansi( high, red)~* Donations doubles are set to 10 minutes, always.
#say %ansi( high, red)~* This is fine for now, but if the duration changes in the future, this will need to be addressed.
#say
#say %ansi( 8)You may now change the audible alert for double tracker ~(For those who know how to edit
#say %ansi( 8)aliases and use the ~#play command!~) by typing ~#edit dalertc, and changing the TWO places
#say %ansi( 8)where there are 2 lines of ~#beep.</value>
</alias>
<alias name="DTrackOn" autoappend="true" id="628">
<value>#say %ansi( high, green)-~=+ %ansi( high, cyan)Double Tracker Started! %ansi( high, green)+~=-
#T+ {GroupInfo|DoubleTracker|TrackOn}
#if (%1) {dbltime={%1}} {dbltime={10}}
dblxp={0}</value>
</alias>
<alias name="ThisDblI" autoappend="true" id="629">
<value>#IF (%0) {%0 ~@WThis @doubleinfotmp~@Y~.} {@dblchan ~@WThis @doubleinfotmp~@Y~.}</value>
</alias>
<alias name="DblC" autoappend="true" id="630">
<value>#pr dblchan "Enter the name of the default channel to report to"</value>
</alias>
<alias name="DAlert" autoappend="true" id="631">
<value>#va dalert %mod( %eval( @dalert+1), 4)
#case @dalert {#say %ansi( high, cyan)-~=+ %ansi( high, white)No Alerts %ansi( high, cyan)+~=-} {#say %ansi( high, cyan)-~=+ %ansi( high, white)Audible Alert ~(2 Beeps~) %ansi( high, cyan)+~=-} {#say %ansi( high, cyan)-~=+ %ansi( high, white)Visual Alert ~(Seen in any window~) %ansi( high, cyan)+~=-} {#say %ansi( high, cyan)-~=+ %ansi( high, white)Audible and Visual Alert %ansi( high, cyan)+~=-}</value>
</alias>
<alias name="dalertc" autoappend="true" id="632">
<value>#case @dalert {%null} {#beep;#alarm +1 {#beep}} {#mess Bonus EXP!!} {#beep;#alarm +1 {#beep};#mess Bonux EXP!!}</value>
</alias>
<alias name="PTSet" autoappend="true" id="633">
<value>#pr PTTrack "Enter the EXACT, case specific name, of the person to track damage for."</value>
</alias>
<var name="dbltime" id="1727">10</var>
<var name="dblxp" id="1728">0</var>
<var name="adblxp" type="String" usedef="true" id="1729">
<value>GroupInfo|DoubleTracker</value>
<default>GroupInfo|DoubleTracker</default>
</var>
<var name="dblavgxp" id="1730">0.0</var>
<var name="oadblxp" type="String" usedef="true" id="1731">
<value>GroupInfo|DoubleTracker</value>
<default>GroupInfo|DoubleTracker</default>
</var>
<var name="odblavgxp" id="1732">0</var>
<var name="odblxp" id="1733">0</var>
<var name="odbltime" id="1734">10</var>
<var name="doubleinfo" id="1735">double activated randomly to advertise donations at 11:30A11-03-09</var>
<var name="doubleinfotmp" id="1736">double activated randomly to advertise donations at 11:30A11-03-09</var>
<var name="dblchan" id="1737">spo</var>
<var name="dalert" id="1738">2</var>
<var name="DblVarClear" id="1739">#unvar</var>
<var name="PTTrack" usedef="true" id="1740"/>
<trigger priority="30440" id="3044">
<pattern>^For the next (%d) minutes experience is doubled in honor of the new superhero.$</pattern>
<value>#say %ansi( high, green)-=+ %ansi( high, cyan)Double Tracker Started! %ansi( high, green)+=-
#T+ {GroupInfo|DoubleTracker|TrackOn}
dbltime={%1}
dblxp=0
doubleinfotmp={double activated for player reaching Superhero at %time( hh:mmA/P mm-dd-yy)}
dalertc</value>
</trigger>
<trigger priority="30450" id="3045">
<pattern>^Double experience for (%d) minutes courtesy of (%w).$</pattern>
<value>#say %ansi( high, green)-=+ %ansi( high, cyan)Double Tracker Started! %ansi( high, green)+=-
#T+ {GroupInfo|DoubleTracker|TrackOn}
dbltime={%1}
dblxp=0
doubleinfotmp={double activated by %2, using a Christmas card, at %time( hh:mmA/P mm-dd-yy)}
dalertc</value>
</trigger>
<trigger priority="30460" id="3046">
<pattern>^For the next (%d) minutes all experience is doubled!!$</pattern>
<value>#say %ansi( high, green)-=+ %ansi( high, cyan)Double Tracker Started! %ansi( high, green)+=-
#T+ {GroupInfo|DoubleTracker|TrackOn}
dbltime={%1}
dblxp=0
doubleinfotmp={double activated by a game event ~(such as the death of a million mobs~) at %time( hh:mmA/P mm-dd-yy)}
dalertc</value>
</trigger>
<trigger priority="30470" id="3047">
<pattern>^~[(*)(%d) minutes of double exp started courtesy of donations being open ~]$</pattern>
<value>#SAY %ansi( high, green)-=+ %ansi( high, cyan)Double Tracker Started! %ansi( high, green)+=-
#T+ {GroupInfo|DoubleTracker|TrackOn}
dbltime={10}
dblxp=0
doubleinfotmp={double activated randomly to advertise donations at %time( hh:mmA/P mm-dd-yy)}
dalertc</value>
</trigger>
<trigger priority="30480" id="3048">
<pattern>^Below the flare, you hear (%w) scream 'HEAR ME FOR I HAVE CONQUERED!'$</pattern>
<value>#alarm +1 {#va doubleinfotmp %replace( @doubleinfotmp, player, %1)}</value>
</trigger>
<trigger priority="30490" id="3049">
<pattern>^INFO: Double experience is running in honor of (%w) reaching superhero. (%d) minutes left.$</pattern>
<value>#say %ansi( high, green)-=+ %ansi( high, cyan)Double Tracker Started! %ansi( high, green)+=-
#T+ {GroupInfo|DoubleTracker|TrackOn}
dbltime={%2}
dblxp=0
doubleinfotmp={double activated for player reaching Superhero at %time( hh:mmA/P mm-dd-yy)}
#alarm +1 {#va doubleinfotmp %replace( @doubleinfotmp, player, %1)}
dalertc</value>
</trigger>
<trigger priority="30500" id="3050">
<pattern>^INFO: Double experience is running courtesy of Aardwolf supporters ~-see help donate. (%d) minutes left.$</pattern>
<value>#say %ansi( high, green)-=+ %ansi( high, cyan)Double Tracker Started! %ansi( high, green)+=-
#T+ {GroupInfo|DoubleTracker|TrackOn}
dbltime={%1}
dblxp=0
doubleinfotmp={double activated randomly to advertise donations at %time( hh:mmA/P mm-dd-yy)}
dalertc</value>
</trigger>
</class>
Reply with quote
GeneralStonewall
Magician


Joined: 02 Feb 2004
Posts: 364
Location: USA

PostPosted: Tue Nov 03, 2009 9:24 pm   
 
This might be a case of corrupted settings. Try exporting your settings and importing them into a fresh session.
Reply with quote
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Tue Nov 03, 2009 9:58 pm   
 
I have imported this session from zMUD, and worked from there.

I have repeatedly tried, and got it confirmed that when I have another window marked, like a capture window e.g., threads will be executed in that window according to #THREAD, at least when I execute an alias that has a #WAIT in it.
- Should it be like this? Can someone else try and see if you get this to happen also?

With regards
//DanteX
Reply with quote
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Wed Nov 04, 2009 5:37 pm   
 
Ok, I have created a new session... And I still have the problem with threads being executed in the window I've marked atm, which causes all variables withing that script to basically be overwritten.
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Nov 06, 2009 5:20 pm   
 
Well, since this is the Beta Testing forum, you are going to need to help us track down the problem by creating a simpler version of your script that we can test. See if you can narrow down the specific variable problem to a simpler procedure.
Reply with quote
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Fri Nov 06, 2009 6:07 pm   
 
Zugg - want me to send you the package?
Reply with quote
Josiah.Bruns
Apprentice


Joined: 04 Mar 2007
Posts: 103

PostPosted: Fri Nov 06, 2009 7:10 pm   
 
i have alot of the same issues.

i have gauges for all my chars and the variable HP is used for all my chars. and some times the trig from one window updates the HP variable in the wrong window.
when this starts happeneing i usually just start using the long form for variable definition i.e. //window/class/variable.

i play 4 chars a once and the weird part is it doesn't do this with all the chars just some of them some of the time. i am not really sure how to narrow it down to whats causing it but the full variable name thing is a decent work around.

not sure how to do math at the end of the line though.

@ //window/class/variable/5

@MaxHp/5 seemed to make more sense i am not sure if the long form works here.

hope this is helpful
Reply with quote
chris-74269
Magician


Joined: 23 Nov 2004
Posts: 364

PostPosted: Fri Nov 06, 2009 10:41 pm   
 
I've had this issue a lot too, I've mitigated some of it by making my scripts use #class name #class 0 a lot more, I think it might be related to having a variable set like #var blah {} classname, which may cause cmud to consider the classname given by #var its working class
Reply with quote
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Fri Nov 06, 2009 10:50 pm   
 
Josiah and Chris, I'm thankful for your support, I hope we can find a solution to this. As far as I have seen / made, none of my aliases have "#var blah {} classname", only "#var blah {}" but I still have the problem.

I have not been able to isolate the problem yet...
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Nov 11, 2009 5:28 pm   
 
As I said above, if you are having this problem, you need to narrow it down to the simplest script possible that reproduces the problem so I can test it here.

There are NO KNOWN bugs in the current CMUD Beta version regarding scoping. However, window and class scoping in CMUD is quite different than in zMUD, so if you are just blindly trying to convert a complex zMUD script, then you might run into problems.

I see people posting a lot of "me too" messages, but nobody is showing a specific gauge or script with the problem.
Reply with quote
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Wed Nov 11, 2009 8:46 pm   
 
What is the difference in the handling? is there a way to specify the location of the variable that's being read / written?

I haven't had time yet to work on this, but I'll try to look at it.

But as I said... both threads being excecuted in the wrong window (a capture window e.g.) AND variable / alias storaged at the wrong location, cause my scripts to screw up... If I scroll in a capture window while scripts are running, variables get overwritten completely....
Reply with quote
Josiah.Bruns
Apprentice


Joined: 04 Mar 2007
Posts: 103

PostPosted: Wed Nov 11, 2009 9:07 pm   
 
yeah you can specify where the variable is:

in my game sigiling a mob sort of marks it as taken:

sigil @//OverdriveGeneral/BotStatus/CurrentMob

this command grabs the varible from the package OverdriveGeneral the class BotStatus and the variable name is Current Mob.
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Wed Nov 11, 2009 10:13 pm   
 
Quote:
#T+ {GroupInfo|DoubleTracker|TrackOn}

CMUD accepts this syntax. I wonder why. Does it assume that it must perform #T+ for three different settings?

Quote:
alias name="DblHelp"

It doesn't compile for me.
_________________
My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Wed Nov 11, 2009 11:34 pm   
 
Quote:

#T+ {GroupInfo|DoubleTracker|TrackOn}


It is a valid syntax, though a holdover from ZMud for backwards compatibility. The {} part is the same as the filepath that you use to access a file (ie, cmud.exe) on your computer. What this one tells me is that there's a class called GroupInfo that contains a classed called DoubleTracker that contains a trigger/alias/etc called TrackOn.

Quote:

alias name="DblHelp"


What are you trying to do here? The above is a=b variable assignment syntax. It won't compile because you can't use a=b syntax with variable names that have spaces in them. If you are wanting to define an alias, the correct syntax is #ALIAS name($named,$parameters) {code to execute} {class path (optional)}.
_________________
EDIT: I didn't like my old signature
Reply with quote
Arde
Enchanter


Joined: 09 Sep 2007
Posts: 605

PostPosted: Thu Nov 12, 2009 4:10 pm   
 
Matt, you've completely missed the point. Run the compatibility wizard for the original poster' script and you'll see what I meant. Though, the information about another holdover from zMUD was for me useful, yet it is pity that CMUD has many undocumented old "features". How one suppose I can debug a piece of script if I even not sure what is by the rules and what against the rules?
_________________
My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads
Reply with quote
Zugg
MASTER


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

PostPosted: Thu Nov 12, 2009 5:30 pm   
 
Let's be nice...Matt was trying to help and his information was correct.

There isn't any problem with the "#T+ {GroupInfo|DoubleTracker|TrackOn}" syntax. What you might call an "undocumented old feature" is called "backwards compatibility" by other people. I tried to do as much as I could to allow existing zMUD scripts to run with the minimum number of problems. And Matt was correct in pointing out that this is perfectly valid syntax for accessing nested subclasses with #T+.

And as Matt said, the reason

alias name="DblHelp"

does not compile is because you cannot have spaces in variable names in CMUD.

When I run the compatibility report on the above script, the only problem that I get is a line like this:
Code:
#say %ansi( high, green)-~=: DTrackOn (X)" ":~=-%ansi( high, yellow) Enables double tracker manually. (X) is for duration ~(default is 10~).

because CMUD treats the () parenthesis as special characters to evaluate math expressions. The correct CMUD syntax for this line is to enclose the entire argument in the {} characters which act as quotes but allows function and variable expansion within:
Code:
#say {%ansi( high, green)-=: DTrackOn (X) :=-%ansi( high, yellow) Enables double tracker manually. (X) is for duration (default is 10).}

You'll notice that by properly using the {} around the argument, then you can get rid of the unnecessary ~ characters. Makes the entire script easier to read.

zMUD was very sloppy about not requiring " quotes or {} braces around the arguments to some commands like #SAY. CMUD is picker about this, and while it tries to handle it as well as possible, special characters like () can mess it up. I see that the original script had ~ characters in front of some parens, but not all of them.

After putting {} around all of the #SAY arguments, then the original script passed the compatibility report just fine.

But this still doesn't address the CORE ISSUE of this thread, which is variables being created in the wrong window. So let's please try to get back to that topic and give me some sample script to reproduce that problem.
Reply with quote
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Thu Nov 12, 2009 7:15 pm   
 
You are correct Zugg, that particular part did not compile because of the parantheses, but as you said it's not the core issue. I am working on isolating the problem...

I have sent a number of error reports as CMUD as crashed for me (I send whenever I can), does that help you anything maybe?
Reply with quote
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Fri Nov 13, 2009 3:56 pm   
 
Another thing that should be mentioned, is that the problem described above not only applies to variables, but also to aliases being created / modified. The example of such an alias is in thread http://forums.zuggsoft.com/forums/viewtopic.php?t=34193&highlight=
Reply with quote
Zugg
MASTER


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

PostPosted: Fri Nov 13, 2009 5:53 pm   
 
Well, Scoping rules apply to *any* setting being created, so if it's happening for Variables, then it's also going to happen for Aliases, Triggers, or any other setting being created by the script.

But until this can get narrowed down to a simple script that reproduces the problem, I still can't say whether this is a bug or if a particular script just isn't using the scoping rules properly.
Reply with quote
DanteX
Apprentice


Joined: 13 Aug 2007
Posts: 166

PostPosted: Sat Jan 30, 2010 11:57 am   
 
This issue has become somewhat solved. The program seems to first write to, then read from, the same location always.

This means that the scripts don't break, but a lot of junk variables end up being well... everywhere in my capture windows. I might actually start to use cmud for real now again.

The variables end up being written to the capture windows when a script runs in the main window, but I have a capture window marked, e.g. while reading there and scrolling.

//DanteX
Reply with quote
shalimar
GURU


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

PostPosted: Sat Jan 30, 2010 1:01 pm   
 
Since this seems related...

Variable definition within room scripts will always create the variable as also part of the room script, even though the variables exists elsewhere.

#VAR patrol {east}

is not enough, i have to use

#VAR patrol {east} _nodef {GuardDuty}
_________________
Discord: Shalimarwildcat
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Feb 01, 2010 4:07 pm   
 
Could you clarify, Shalimar? When you say "within room scripts", do you mean within the enable/disable scripts of classes which have keys that are room IDs? Or scripts which are within those classes?
Reply with quote
shalimar
GURU


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

PostPosted: Tue Feb 02, 2010 5:10 pm   
 
In the Enable script in my case, it creates within the class for the room unless i tell it explicitly, as above
_________________
Discord: Shalimarwildcat
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum 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