Can some1 explain me why this god damn Tokenizer doesnt work with this:
public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
{
if (command.equalsIgnoreCase("countppl")) {
StringTokenizer st = new StringTokenizer(target);
String char1 = "";
String char2 = "";
String char3 = "";
String char4 = "";
if (st.hasMoreTokens()) char1 = st.nextToken();
if (st.hasMoreTokens()) char2 = st.nextToken();
if (st.hasMoreTokens()) char3 = st.nextToken();
if (st.hasMoreTokens()) char4 = st.nextToken();
activeChar.sendMessage("Selected: 1:"+char1+", 2:"+char2+", 3:"+char3+", 4:"+char4);
}
Same goes for:
StringTokenizer st = new StringTokenizer(command, " ");
st.nextToken();
and
StringTokenizer st = new StringTokenizer(command);
st.nextToken();