String Help?
I have a variable that holds a string value like so:
Code:
|
Re: String Help?
contain() ?
|
Re: String Help?
Quote:
Wouldn't "15" register? Meaning it contain would return true? |
Re: String Help?
Simple, just strtok the string then loop through arrays and find if contain or not the wanted number. :wink:
Tell me if you want a little demonstration :p |
Re: String Help?
Quote:
I already tried using 'strtok' and failed horribly. |
Re: String Help?
Here...i've tested it, and works, but one little thing...read the comment at String[] :s
Code:
public plugin_cfg() //You can use your_func, i've used this for debug. :) |
Re: String Help?
Quote:
Though.. I ran into a small problem. I commented the problem: Code:
Running the current code, throws a "Index out of bounds" error. EDIT: Also. "ACHVS_NUM" is defined as 10 |
Re: String Help?
Nah, you don't need to copy it into String[] that was just an e.g , in your case will be something like...
Code:
public bool:CheckAchievement(id,achievement) |
Re: String Help?
Quote:
Also, Yeah, that's correct. Code:
|
Re: String Help?
I would do something like :
Code:
|
| All times are GMT -4. The time now is 11:13. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.