>Also, any idea why it's saving the player's name back to the player in my
>solution #2?
Yeah, strcat appends the given text or string to the first string given.
Sort of like:-
string = string + new_bit
What your code does is strcat onto the players name as held in the
playerlist (which is written to file every so often and a particular players
info is written whenever they type save or some in game event happens -
death being a prime example). So what is actually happening is:-
players name = players name + (either ' or 's)
This also explains the behaviour of the routine in giving things like
"Davis''s's's"
The first time it notices that the last character is an 's' and appends a
single apostrophe. The second time it goes "Hey! the last letter isn't an
's' anymore so I need to add 's"
Hope that helps.
-JOn.
--
+---------------------------------------------------------------+
| FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
| Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
+---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/06/01 PST