Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Problems with Admin Tool (https://forums.graalonline.com/forums/showthread.php?t=64062)

Mark Sir Link 02-12-2006 06:08 AM

Problems with Admin Tool
 
Little admin tool I'm scripting. I'm quite new with GS2, so I figured it would be a good first attempt.

Anyway, it's not working, not throwing off any errors either. Hoping I could get some help...


PHP Code:

if (actionserverside) {
  if (
params[0]=="/head") {
      
with (params[1]) {
        
players.headimg=params[2];
      }
    }
...
//#CLIENTSIDE
function onPlayerChats()
{
if (
players.chat.starts("/")) {
    
tokens string.tokenize(players.chat);
    
triggeraction(0,0,"serverside","Staff Tool",tokens[0],tokens[1],tokens[2],tokens[3]);
  }
  } 

anybody seeing what's wrong?


EDIT: Thanks lance, after reading that I checked back and was able to fix the whole tool.
I got the uses of players and player mixed up

Lance 02-12-2006 06:15 AM

Quote:

Originally Posted by Mark Sir Link
Little admin tool I'm scripting. I'm quite new with GS2, so I figured it would be a good first attempt.

Anyway, it's not working, not throwing off any errors either. Hoping I could get some help...


PHP Code:

if (actionserverside) {
  if (
params[0]=="/head") {
      
with (params[1]) {
        
players.headimg=params[2];
      }
    }
...
//#CLIENTSIDE
function onPlayerChats()
{
if (
players.chat.starts("/")) {
    
tokens string.tokenize(players.chat);
    
triggeraction(0,0,"serverside","Staff Tool",tokens[0],tokens[1],tokens[2],tokens[3]);
  }
  } 

anybody seeing what's wrong?

For starters:

player.chat.tokenize()

not string.tokenize(players.chat)

ApothiX 02-12-2006 11:34 AM

Addition to Lance's Post:
the 'string' in the documentation means that you use a string-type variable as the object. (I believe even "blah blah".tokenize() works, but I could be wrong)


All times are GMT +2. The time now is 12:30 PM.

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