String not passing in SetTimer (seems illogical)
#1

This problem is really pissing me off, all the code looks perfect but it just doesn't work properly.

Basically if someone says a word in OnPlayerText, it sets a timer with a randomised phrase to be sent back to them:

pawn Код:
public Reply(playerid, text[])
{
    print(text); // this prints: "<null>"

    new h, m, s;
    gettime(h, m, s);
    msgaF(WHITE, "reply string: {FFFFFF}%s", text);
    printf("[%d:%d:%d] reply string: {FFFFFF}%s", h, m, s, text);
}
public OnPlayerText(playerid, text[])
{
    if(strfind(text, "word", true)!=-1)
    {
        new r = random(sizeof(ReplyArray));
        printf("random = %d, text to say = %s", r, ReplyArray[r]); // This prints the correct number and correct string
        SetTimerEx("TalkSteve", 3000, false, "ds", playerid, ReplyArray[r]); // This all seems perfect, am I missing something?
    }
Am I just overtired and missed something obvious?
Would appreciate replies thanks
Reply


Messages In This Thread
String not passing in SetTimer (seems illogical) - by [HLF]Southclaw - 22.04.2011, 00:31
AW: String not passing in SetTimer (seems illogical) - by Nero_3D - 22.04.2011, 00:52
Re: String not passing in SetTimer (seems illogical) - by [HLF]Southclaw - 22.04.2011, 01:33

Forum Jump:


Users browsing this thread: 1 Guest(s)