![](templates/Classic/images/spacer.gif) |
Josiah.Bruns Apprentice
Joined: 04 Mar 2007 Posts: 103
|
Posted: Sun Oct 04, 2009 3:21 pm
proper variable usage |
my variables get created in various places and even when its all ready created it will create an other one and put it somewhere troublesome.
how am i supposed to create and use variables so this doesn't happen? |
|
|
![](templates/Classic/images/spacer.gif) |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sun Oct 04, 2009 4:17 pm |
Use the variable command to specify the class name, or alternatively use the path name (//module/class/class/.../varname, or whatever is the correct format)
|
|
_________________ EDIT: I didn't like my old signature |
|
|
![](templates/Classic/images/spacer.gif) |
Josiah.Bruns Apprentice
Joined: 04 Mar 2007 Posts: 103
|
Posted: Sun Oct 04, 2009 7:08 pm |
i changed all variable usage to explicit.
//ModuleName/ClassName/VariableName=1
@//ModuleName/ClassName/VariableName
More specifically.
//teagan/bot/variables/ipaths=@//teagan/bot/variables/ipaths+1
//teagan/bot/variables/imobs=@//teagan/bot/variables/imobs+1
this seems to have fixed the flaky varible creation issues. i also changed the name of my class variables and counters to just variables in case it was having trouble with the space.
i think this has fixed the issue and from now on i will use all explicit variables.
Thanks Matt |
|
|
![](templates/Classic/images/spacer.gif) |
Tech GURU
![](images/avatars/172896370346230b24779a1.gif)
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Sun Oct 04, 2009 7:20 pm |
Glad that resolved the issue for you. Remember that when you don't explicitly specify where you want you variables created scoping rules apply so the variable creation will depend on what trigger/alias is executing, the current focus window, the folder structure and what classes are disabled/enabled. When in doubt be specific.
Happy Mudding. |
|
_________________ Asati di tempari! |
|
|
![](templates/Classic/images/spacer.gif) |
|
|