|
daemoan.vermillious Apprentice
Joined: 28 Feb 2009 Posts: 135 Location: Chico, Ca
|
Posted: Mon Nov 16, 2009 2:30 am
Variable Counter? |
I have a Variable Counter like this shooting to my status window before...
like:
#add chatcount 1
and it would add to the vaiable, but now I have it going to another window, and its acting funky
its not adding em up its just addings 11111111111 which is poping out my session log window,
#execwin PlagueStatus {#say C: @chatcount T: @tellcount S: @saycount}
Returns: C: 1111111111111111111111111 T: 11 S: 1111 |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Nov 16, 2009 4:42 am |
The variable is probably set as a string. Set it to autotype or a numeric type.
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
daemoan.vermillious Apprentice
Joined: 28 Feb 2009 Posts: 135 Location: Chico, Ca
|
Posted: Mon Nov 16, 2009 5:01 am |
got it thanks matt
|
|
|
|
daemoan.vermillious Apprentice
Joined: 28 Feb 2009 Posts: 135 Location: Chico, Ca
|
Posted: Mon Nov 16, 2009 9:28 pm |
This Should Be REturning 3 into my variable output right?
<var name="tellcount" id="9">
<value>111</value>
<default>0</default>
</var>
still returning 111 instead of 3
it worked when sendign to status indow but I think Ive gotta do something else if Iam sending it to a session window |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Nov 16, 2009 9:40 pm |
What's the trigger that's doing the change to the variable? #ADD is a math command, but if you are doing something else that uses the variable as a string-type (ie, string, stringlist, datarecord) then it will treat the variable as a string instead of a number.
Where you display the results won't matter for this, so something somewhere is doing a non-math operation on your variable. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
daemoan.vermillious Apprentice
Joined: 28 Feb 2009 Posts: 135 Location: Chico, Ca
|
Posted: Mon Nov 16, 2009 10:01 pm |
Trigger:
<trigger priority="70" id="7">
<pattern>^~|~)~>chat~<~(~| %1~: %2</pattern>
<value>#capture PlagueLog
#add chatcount 1</value>
</trigger>
Variable:
<var name="chatcount" id="8">
<value>11112</value>
<default>0</default>
</var>
I really dont see anything Iam doing different than before... |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Nov 16, 2009 10:18 pm |
Try going to a number format. Integer is good enough.
The only other wrong thing you're doing is the %1/%2 in the trigger pattern, but I don't see how that could be affecting the variable. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|