| cbk1994 |
07-13-2010 04:16 PM |
Quote:
Originally Posted by Switch
(Post 1587339)
Will tokenize everything between /'s.
|
No, no, no!
'weps' in the weapon object, not the name of the weapon.
If you want the last part:
PHP Code:
for (temp.weps : player.weapons) { temp.tokens = weps.name.tokenize("/"); temp.realName = tokens[tokens.size() - 1]; }
You also might want to name the temporary weapon object 'wep' instead of 'weps' as the latter indicates that it is a list of weapons rather than a single weapon.
|