Graal Forums  

Go Back   Graal Forums > Development Forums > Tech Support
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-03-2006, 11:33 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Server Update

Well, Era's server was updated (from the admin cp), and since then, it's been fooling us around!
-Commands is an NPC, check the warpto function.
(It beings in the clientside part, looking at this, it'll send the player's chat to the serverside, depending on what the player says. If it doesn't start with a / but it is either warpto, sethead or setshield, it'll send the lower triggeraction. If it does begin with a / it'll send the top triggeraction.
Although, the error is the tokenize part at the top!
HTML Code:
  if (!player.chat.starts("/") &&
      !player.chat.starts("sethead") &&
      !player.chat.starts("setshield") &&
      !player.chat.starts("warpto"))
  { 
    return;
  }
  
  if (player.chat.starts("/"))
  {
    triggerserver("gui", this.name, player.chat.substring(1, 50), "");  
    //THE / WARPTO
  }
    else
  {
    triggerserver("gui", this.name, player.chat);
    //THE NO / TRIGGERACTION
  }
However, when it's sent, we have this
HTML Code:
function onActionServerSide(text)
{
  arguments = text.tokenize();
  command = arguments[0];
  arguments.delete(0);
  --STUFF HERE--
}
When trying to debug this, when adding in
echo(arguments.size());, it returns 0...
Although, when doing echo(arguments[1]), it'll return the correct thing (the 2nd chat of the player, (1, if you're doing it tokenize)). I hope you understand this :O
__________________
Reply With Quote
  #2  
Old 07-03-2006, 08:46 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Fixed, will upload the updated npcserver to the other machines soon.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 03:49 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.