Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-27-2010, 04:27 AM
Jiroxys7 Jiroxys7 is offline
Hazard to Graal
Jiroxys7's Avatar
Join Date: Apr 2009
Posts: 343
Jiroxys7 will become famous soon enough
using tokenscount

okay, so lets say i've done temp.test = clientr.equips_weapon.tokenize(",");
how do i get the number of tokens produced with tokenscount? It seems to be returning 0 whatever I do.

Also, do i need to even do temp.test = var.tokenize(","); or can i simply leave it as var.tokenize(","); and proceed to checking the number of tokens produced with tokenscount?

And also, would I be able to somehow use tokenscount easily with an array?
Example, Lets say I have:
PHP Code:
temp.array = {
  
var1.tokenize(","),
  
var2.tokenize(","),
  
//etc
} 
or, assuming it would work:
PHP Code:
temp.array.tokenize(",") = {
  
var1,
  
var2,
  
//etc
} 
would there be a way to grab the tokenscount of var1 and var2 without being required to do something like:
PHP Code:
temp.array[0].tokenize(",");
var.
a = tokenscount;
temp.array[1].tokenize(",");
var.
b = tokenscount;
//etc 
or something?
__________________
MY POSTS ARE PRONE TO EDITS!
Reply With Quote
 


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 09:02 PM.


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