25.08.2011, 06:08
Quote:
Hi guys, so I'm having trouble with strtok (I'm using strcmp, not DCMD or anything, and that's what I wanna use so please don't try and convince me otherwise).
|
Anyway, it helps if you actually understood what the strtok function did. It simply removes white spaces found in a string, based on an index to start searching at.
pawn Code:
new
tmp1[ 128 ],
tmp2[ 128 ],
tmp3[ 128 ],
idx;
tmp1 = strtok( cmdtext, idx ); // Finds the first parameter
tmp2 = strtok( cmdtext, idx ); // Finds the second parameter
tmp3 = strtok( cmdtext, idx ); // Finds the third parameter