I downloades the alias snippet from Samson's page (alsherok.net), and it works nicely, but I am trying to make it so that if a player makes an alias with a semicolon in it, it will interpret it as more then one command, and first execute the command before the semicolon then try doing the one after the semicolon. Here is what I've come up with so far, and it isn't working too well, if you have any suggestions how I can get it to work.
This is only the code meant to look for a semicolon, but it doesn't seem to work properly. I'm not sure how clear I was, I can explain again if you can't understand what I want to do.
-Jay
char *x;
char arg2[MAX_INPUT_LENGTH];
int y;
y = 0;
x = arg;
for( x = arg; *x != '\0'; x++ )
{
if(*x == ';')
{
y = 0;
interpret(ch, arg2);
strcpy(arg2, arg);
arg2 == NULL;
return TRUE;
}
else
{
arg2[y] = *x;
y++;
}
}
This is only the code meant to look for a semicolon, but it doesn't seem to work properly. I'm not sure how clear I was, I can explain again if you can't understand what I want to do.
-Jay