ID:157593
 
I am sure this is simple, but for some reason by brain is not able to do this. So you can do a find text, but how would I if someone inputs a name say Bob Smith and i had this information like this bobsmithplayed50payed100 ect how would i count and would I start on 0 or one? Any suggestions and if this doesn't make since I can try to explain better.
Do you mean in the Dream Maker or as part of your code?
If you mean in the dream maker , simply press Ctrl + F

This seems like a very quick and sloppy post so it would be great if you could try write a better explanation. Thanks.



In response to LowenHeart
Well first I apologize for my post being "Sloppy", however I simply think asking me to elaborate on the questions may have been a lot nicer. Second I didn't think it was so unclear what I was asking. Scatter brained yes, but again I was trying to think of how to word it at all. Third to attempt to explain better I will try to type an example.

User Enters In Name : Bob Smith
Program Searches Text Full of Names That Look Like This:
JoeSomebodyBenicerNexttimeBobSmith etc.

Now I am sure a simple findText() command would work I just wasn't sure if there was an easier way, and I didn't know if I would need to do a count step or anything further.

Last, I have another question. I will also try to explain this more clearly and less "Sloppy".

On a webpage BYOND for example I want to know the number of players online and use that number in my game for whatever reason. How would I pull said information from a webpage, and turn it into usable data?

Thank you for reading. I do apologize for my "Sloppy" post.

Thanks,
Brent
In response to Smokymcpot
I beleive this could work. Its just a mod of the who verb in the dm guide but I set up a variable so that for each player that value gets added one and then the variable amount gets displayed. Sounds weird but probably will make sense below:

mob/verb/who()//defines a verb called who
var/mob/M//define mobs under the variable M
usr << "Active players:"//sends a message
for(M)//for mob M variable
if(M.client)//if M is client
listval = 0//set listval to zero*
listval = listval + 1//add one onto listval for every player there is
usr << "[listval]"//display the listval

mob/var/listval = 0//define the var listval so we can keep track of the value stored in it


*This part seems kinda dumb right? well the thing is if you didnt set the variable to 0, you would be adding on every time!!
In response to Darkjohn66
That is very wrong on multiple levels.

As to the actualy answer to the question: findtext() won't find "Bob Smith" in a text string that contains "BobSmith". You can use ckey() to strip any non-standard characters from "Bob Smith" to get "bobsmith". The Reference entry for findtext() can also provide more information.
In response to Garthor
Garthor wrote:
That is very wrong on multiple levels.

As to the actualy answer to the question: findtext() won't find "Bob Smith" in a text string that contains "BobSmith". You can use ckey() to strip any non-standard characters from "Bob Smith" to get "bobsmith". The Reference entry for findtext() can also provide more information.

Last, I have another question.

I tried to help as best I could giving the way that i knew how to do so :P