|
M0lid3us Beginner
Joined: 18 Nov 2003 Posts: 19 Location: Italy
|
Posted: Thu Nov 03, 2005 11:28 am
Another VA question |
Code: |
PATTERN :
=== (*)>[(*)>] si e' connesso.
CODE:
#window {IP} {%time( "hh.nn.ss") : %1 connesso da >[%2>]}
#VA tmp {%replace( %replace( %2, "-", "_"), ".", "_")}
#ADDI @tmp %1
#GAG
|
I'd like to save all the variables created using @tmp in the "IP_log" class but, if I add the line "#VA @tmp {} _nodef IP_log" every time the trigger fire the @tmp variable became empty
Can anyone help me ?? |
|
|
|
Tech GURU
Joined: 18 Oct 2000 Posts: 2733 Location: Atlanta, USA
|
Posted: Thu Nov 03, 2005 5:01 pm |
That's because if you put the variable definition in the trigger, it initializes the variable to be empty every time the trigger fires. Declare the variable outside of the trigger, and you should be fine. See #VARIABLE for more details.
|
|
_________________ Asati di tempari! |
|
|
|
M0lid3us Beginner
Joined: 18 Nov 2003 Posts: 19 Location: Italy
|
Posted: Thu Nov 03, 2005 6:06 pm |
The problem is that I don't know the variables name. Is there a command to check if a variable is empty or is already created ??
|
|
|
|
Pseudo Wanderer
Joined: 25 Oct 2005 Posts: 99
|
Posted: Thu Nov 03, 2005 6:57 pm |
Use #var <name> without specifying what it is equal to. This will tell you if it is undefined or what it is equal to (if it is already created).
|
|
|
|
M0lid3us Beginner
Joined: 18 Nov 2003 Posts: 19 Location: Italy
|
Posted: Thu Nov 03, 2005 11:05 pm |
Thanks Pseudo, but if I don't specify the value, i can't set the class
|
|
|
|
|
|