![](templates/Classic/images/spacer.gif) |
Aon Beginner
Joined: 12 Nov 2002 Posts: 15
|
Posted: Fri Mar 14, 2003 6:18 pm
Checking for no variable |
Ive set up a info bot to report information about characters to someone who asks.. But I need to make sure they dont just start spamming me with characters that I dont have recorded or doesn't exist.. To keep them from spamming me I made a variable equal to the last request and then checked to see if that was the same and if so not to do it.. But I need to figure out how to tell it not to do anything if the information they are looking for doesnt exist.. But I dont think making sure it isnt equal to 0 works.. Need some help..
|
|
|
![](templates/Classic/images/spacer.gif) |
Troubadour GURU
Joined: 14 Oct 2000 Posts: 556 Location: USA
|
Posted: Fri Mar 14, 2003 8:45 pm |
You might employ the %null function.
#IF %null(@lastrequest) {#NOOP} {say Hello Sailor!}
Troubadour
(Win 98, Pentium III, 550 MHz) |
|
|
![](templates/Classic/images/spacer.gif) |
TonDiening GURU
![](images/avatars/35418510744b1b6777b5a3.gif)
Joined: 26 Jul 2001 Posts: 1958 Location: Canada
|
Posted: Fri Mar 14, 2003 8:55 pm |
A simple way is to track the time since last request.
Release info every 30s or 60s and ignore all other requests from that person.
%secs the number of milliseconds since midnight
The other thing is to queue requests and %pop through them as you go.
You can add priority and a quantity check the requestors.
Depending how where the information is stored, you can check to see if you
"got" anything in the look up. %find or the value of the look up is "" or %null as Troubadour suggests above.
Ton Diening |
|
|
![](templates/Classic/images/spacer.gif) |
Aon Beginner
Joined: 12 Nov 2002 Posts: 15
|
Posted: Sat Mar 15, 2003 5:34 pm |
Hrm well the way I stored variables was taken from a previous help I got here.. I use the who list to get my information and when it sees the name it stores the data on the information with %1Title.. so if I wanted to check to see if it existed Id simply have to see if %1Name exited and if it did I could give the information.. I was also looking to somehow use the number from the %1Status to tell who was in each others range if they asked.. But I cant figure out how to do that with my current variable storage.. Ill try this null thing though.. even though I dont quite understand it.. Thanks guys
|
|
|
![](templates/Classic/images/spacer.gif) |
Aon Beginner
Joined: 12 Nov 2002 Posts: 15
|
Posted: Sat Mar 15, 2003 11:23 pm |
trying to check status I think might be easier for me to do If I could find out how to take the variable apart just like I put it together.. Is there some way to do that? lol Im really not thinking so but it would be nice if it could tell what part was the word and what part was the part I added.. Only way I could think of doing that is by Removing the "Status" or whatever part I added after that and making a list of the left of the name and then drawing out of that list to check the variables.. I dont know... maybe im trying to do this way too complicated..someone help! :P
|
|
|
![](templates/Classic/images/spacer.gif) |
|
|