Hey all,
I want to make a script that checks if someone is at a location, ex: in the bank.
i thought something like:
timer.refresh 0 2 vcmp.chkloc(%name)
alias:
alias vcmp.chkloc {
if ((vcmp.rob.loc($1) == The Warenhouse) && ($vcmp.area($vcmp.getid($1)) != The Warenhouse)) {
vcmp.msg $vcmp.getid($1) You didnt gave the money on time. You lose $ $+ 100.
vcmp.cash- $vcmp.getid($1) 100
}
elseif ((vcmp.rob.loc($1) == The Warenhouse) && ($vcmp.area($vcmp.getid($1)) == The Warenhouse)) {
vcmp.msg $vcmp.getid($1) You gave the money just on time! You get 50% that 2500!
vcmp.cash+ $vcmp.getid($1) 2500
}
}
But this isnt working...
MIRC:
Quote* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
Why ??? ???
Not connected????
And how can i fix this problem??
Pleas help me...
Your missing a few $'s
Any command which has brackets after is (in your case vcmp.rob.loc) should have a $ infront of it.
For example: vcmp.rob.loc($1) would become $vcmp.rob.loc($1)
It'll be the same for your timer. So it'll be
timer.refresh 0 2 $vcmp.chkloc(%name)
Sorry but its not working, thanks for you reply anyways.
now mirc gives this error:
Quote
* /timer: timer .refresh not active
How can i fix this??
Pleas someone??
tried calling it timerrefresh? cant remember if dots after the timer mess things up
Another reason ofcourse is that your forgetting to start the timer :)
Quote from: thijn on September 13, 2008, 08:40:21 AM
Sorry but its not working, thanks for you reply anyways.
now mirc gives this error:
Quote
* /timer: timer .refresh not active
How can i fix this??
hmm isnt there a space between timer and dot (.)
* /timer: timer .refresh not active
See its timer space . refresh in your code
i think it shud be
* /timer: timer.refresh not active
timer dot refresh
Quote from: VRocker on September 13, 2008, 02:03:47 PM
tried calling it timerrefresh? cant remember if dots after the timer mess things up
Another reason ofcourse is that your forgetting to start the timer :)
eeh how can i start and how can i stop it?
Quote* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
-
* /vcmp.rob.chk(%name): not connected to server
It's quite interesting that it's saying that you cannot use vcmp.rob.chk as I cannot see it in your scripts.
Plus, to start a timer all you have to do is...
//timer.refresh 0 2 $whatever_alias_you_need_to_use
I noticed that you are using an infinite timer for specific players.
Your $vcmp.chkloc(%name) is player specific so it would have to start a timer when the player joins then end it when the player leaves.
/timer.refresh off
Thanks for your reply i try that.