Why using native from string.inc crash samp-npc
#3

yes no errors when /* */
And if i try to use if (strfind(text, "stupid bot") != -1) or any else string comparator the crash happen.

Edit: I will attach whole code to see it.

pawn Код:
//
// NPC Test Script
// Kye 2009
//

#include <a_npc>

//------------------------------------------

main()
{
    printf("npcidle: running");
}

//------------------------------------------
//------------ Talk TEST -------------------
public OnPlayerText(playerid, text[])
{

    if (strfind(text, "stupid bot") != -1)
    {
        new string[80], name[MAX_PLAYER_NAME];
        GetPlayerName(playerid, name, sizeof(name));
        format(string, sizeof(string), "Hey %s! Don't say those things! We, bots, are cool!", name);
        SendChat(string);
    }
    return 1;
}
//////////////////////////////////////////////
Compiler say everything is OK. And any chat from player samp-npc crash.
Reply


Messages In This Thread
Why using native from string.inc crash samp-npc - by Azazelo - 09.03.2013, 18:34
Re: Why using native from string.inc crash samp-npc - by MP2 - 09.03.2013, 18:36
Re: Why using native from string.inc crash samp-npc - by Azazelo - 09.03.2013, 18:41

Forum Jump:


Users browsing this thread: 1 Guest(s)