I am trying to change socials so they can be done even if the char isn't in the room. To do this I want to make two seperate functions, one that checks if the first argument after the social is a player name or if the last argument is a players name, and if that is true to go to the function that handles socials directed to chars, and if neither of them are a players name (or they are blank) then go to the function that handles socials in just one room, but I'm not sure how to get from the bool check_socials to the other functions, so if someone can write just a real brief outline for me how to do it, it would be much appreciated.
-Jay
You might change the part where it cycles through the people in the room to cycling through all connected players. That might be a simple way of doing it.
Yep, did that, I had to redo the ignore part since it only checked if you were ignoring the people in the room.
Another thing I need is to remove the space at the end of an array, how can I do this?
-Edge
Not sure what you mean by "space at the end of an array".
OK, I've got char *argument; which contains 'x ' and I want it to only contain x, how would I do it? I'm also wonder how to clear an array, since I am using a for statement to use the same array each time, and it seems to keep whatever was in it previously until I change it, is there any any way to clear it?
-Edge
Hmmm - you are asking about pointers and it looks like you are not too sure how they work.
One possible way is this:
char * p = "x";
Here is another way:
char * pp;
pp = malloc (100); // allocate 100 bytes for the string
strcpy (pp, "x"); // put "x" in it
Here is how you could "empty" it:
strcpy (pp, "");
However I would not blindly copy this code. Find a book on C and read up on how pointers work.