Multi Lined Dynamic Strings.
#1

Hello, I am developing a role-play server and i have difficulties with making strings / text what player enters in chatbot in multiple lines IF it exeeds string limit
I've tried this way:
pawn Code:
public OnPlayerText(playerid, text[])
{
    new message[128],message2[128];
    format(message, sizeof(message), "%s says: %s", GetName(playerid), text);
    message = message2;
    new stringLength = strlen(message);
    if(stringLength >= 127)
    {
        strdel(message,128,256);
        ProxDetector(30.0, playerid, message, -1);
        strdel(message2,0,127);
        ProxDetector(30.0, playerid, message2, -1);
    } else {
        ProxDetector(30.0, playerid, message, -1);
    }
    return 0;
}
But, all it does is it makes new 2 empty lines...
Help is apreetiated.
Reply


Messages In This Thread
Multi Lined Dynamic Strings. - by [WSF]ThA_Devil - 08.07.2012, 12:01
Re: Multi Lined Dynamic Strings. - by Toreno - 08.07.2012, 12:14
Re: Multi Lined Dynamic Strings. - by [WSF]ThA_Devil - 08.07.2012, 12:20

Forum Jump:


Users browsing this thread: 2 Guest(s)