Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-12-2006, 06:08 AM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
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

Last edited by Mark Sir Link; 02-12-2006 at 06:19 AM..
Reply With Quote
  #2  
Old 02-12-2006, 06:15 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
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)
Reply With Quote
  #3  
Old 02-12-2006, 11:34 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
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)
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
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 11:54 AM.


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