View Single Post
  #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