Little Help With RegEx
#1

Hey, I haven't scripted in pawn for awhile now...
I'm having trouble trying to get this little snippet to work, what I want it to do is limit the characters you are allowed to use with the /me command and I can't quite get it to work. Also how would I be able to tell them their message is too long? Thanks for your help

Код:
#define MeOutput(%1) \
    regex_search(%1, "^(.{1,72})")
I know the RegEx is correct I just can't get it to work the way I want (It doesn't return anything)
Код:
    if(!strcmp(cmdtext, "/me", true, 3))
    {
        if(!cmdtext[3])return SendClientMessage(playerid, 0xFFFF00AA, "USAGE: /me [action]");
        new str[128];
        GetPlayerName(playerid, str, sizeof(str));
        format(str, sizeof(str), "%s %s", str, ReturnText(cmdtext[4]));
        SendClientMessageToAll(0x400080FF, str);
        return 1;
    }
Reply


Messages In This Thread
Little Help With RegEx - by [AU]Ownage - 14.01.2013, 15:18
Re: Little Help With RegEx - by mineralo - 14.01.2013, 15:21
Re: Little Help With RegEx - by [AU]Ownage - 14.01.2013, 15:30

Forum Jump:


Users browsing this thread: 1 Guest(s)