Only returns numeric results.
#1

pawn Код:
if(strcmp(cmd, "/accent", true) == 0)
    {
        if(IsPlayerConnected(playerid))
        {
            new length = strlen(cmdtext);
            tmp = strtok(cmdtext, idx);
            if(!strval(tmp))
            {
                SendClientMessage(playerid, COLOR_WHITE, "USAGE: /accent [text]");
                SendClientMessage(playerid, COLOR_WHITE, "NB! It will show as Name_Name says [Chosenaccent accent]: Mytexthere.");
                SendClientMessage(playerid, COLOR_WHITE, "So make sure you make it correct, like Spanish, Russian etc.");
                return 1;
            }
            strmid(PlayerInfo[playerid][pAccent], tmp, 0, strlen(tmp), 255);
            format(string, sizeof(string), "You have set your accent to "lblue"%s", PlayerInfo[playerid][pAccent]);
            SendClientMessage(playerid, COLOR_WHITE, string);
            SavePlayers();
        }
        return 1;
    }
Why? When I do /accent 123 it works fine but when i do /accent Spanish it fails, it must be numeric to return 1. No errors no warnings. Help?
Reply


Messages In This Thread
Only returns numeric results. - by Shuffler - 19.10.2011, 16:55
Re: Only returns numeric results. - by Vince - 19.10.2011, 17:09
Re: Only returns numeric results. - by Jefff - 19.10.2011, 20:37

Forum Jump:


Users browsing this thread: 1 Guest(s)