123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|640|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> iterating through text with spaces...

Sat, 19 Apr 2008, 20:38
Orion Pax
ok my problem is my private message parsing is a bit off in my game. If the user's name has a space I cant figure out a way for it to find the hole name.

Like "Orion Pax Sup peeps" I was iterating through the user names and instr them with the txt variable, but if I have a message thats like this "Orion Pax How is John", if it comes across johns instance before Pax's it will send the message to john in stead of Pax.


Sun, 20 Apr 2008, 03:43
JL235
One idea, just ban being able to send messages to usernames with no spaces. For example I should not be able to send a message to 'o r i o n p a x'. This also helps if you have two players, one called 'orion' the other 'orionpax'. If I send a message to 'orion pax' who am I then sending it to?

You could also put in some marker between the user it's being sent too and the message. So messages are sent something like 'orion pax@what's up peep?'.
Sun, 20 Apr 2008, 05:36
Jayenkai
What if, when you hit a certain key, say T to Talk, the mouse becomes free moving, a list of users appears onscreen, and you can click either a person's name to send a message to them, or "All" to talk to all. (or shortkey A, so T,A will start your basic input..)

In fact, if you're aiming to add teams, or races, or things like that, you could then additionally organise the names into those sub-sections, and have clickable "To the team" style headers, too. (with keyboard input T,M = chat to TeaM, etc)

That way, when you send your message, you need only send a Player ID, rather than decypher the person's name from the string.

-=-=-
''Load, Next List!''
Sun, 20 Apr 2008, 17:01
Orion Pax
I thought about that...but I thought it might be counter productive...I might give it a try tho....