View Single Post
  #1  
Old 08-15-2008, 01:26 AM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
serverwarp() doesn't work serverside

So I was testing some stuff on jothegreat55555's server, and I tried to make a relog/disconnector (to work on other people), and it doesn't work serversided.

This is the errors in RC that I get
PHP Code:
Script: Function serverwarp not found at line 4 in script of SwitchTest (in level lc_a1.nw at pos (00))
Script: Function serverwarp not found at line 8 in script of SwitchTest (in level lc_a1.nw at pos (00)) 
The first line is using "/relog", the second is using "/disconnect" (obviously).

This is the script I'm using
PHP Code:
function onActionServerSide() {
  if (
params[0] == "/relog") {
    
with (findPlayer(params[1]))
      
serverwarp(servername);
  }
  if (
params[0] == "/disconnect") {
    
with (findPlayer(params[1]))
      
serverwarp("Login");
  }
}

//#CLIENTSIDE
function onPlayerChats() {
  
temp.token player.chat.tokenize();
  if (
player.chat.starts("/relog"))
    
triggerserver("gui",this.name,temp.token[0],temp.token[1]);
  if (
player.chat.starts("/disconnect"))
    
triggerserver("gui",this.name,temp.token[0],temp.token[1]);

My question is, is there any way that it will work serversided, or can it be implemented to be serversided?

Not really necassery, I just think it's kind of odd how switching servers seems to be more like something serversided, not clientsided.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote