Code doesnt work well
#1

pawn Код:
if(strcmp(cmd, "/checkapps", true) == 0)
    {
      //if(PlayerInfo[playerid][pAdmin] >= 1)
      //{
            new str1[1280];
            format(str1, sizeof(str1), "Logs/waiters.ini");
            if(!strcmp(dini_Get(str1, "Name"),"None",false))
            {
               format(string, sizeof(string),"%s", dini_Get(str1, "Name"));
               SendClientMessage(playerid, COLOR_YELLOW, string);
            }
            else if(!strcmp(dini_Get(str1, "Name2"),"None",false))
            {
               format(string, sizeof(string),"%s", dini_Get(str1, "Name2"));
               SendClientMessage(playerid, COLOR_YELLOW, string);
            }
             }
the problem its writing Unknown Command, in this line: if(!strcmp(dini_Get(str1, "Name2"),"None",false))
if try to make if dini_get is not None so...
what the problem?
Reply
#2

The problem is what your command is without return.
pawn Код:
if(strcmp(cmd, "/checkapps", true) == 0)
{
//if(PlayerInfo[playerid][pAdmin] >= 1)
//{
    new str1[1280];
    format(str1, sizeof(str1), "Logs/waiters.ini");
    if(!strcmp(dini_Get(str1, "Name"),"None",false))
    {
        format(string, sizeof(string),"%s", dini_Get(str1, "Name"));
        SendClientMessage(playerid, COLOR_YELLOW, string);
        return 1;
    }
    else if(!strcmp(dini_Get(str1, "Name2"),"None",false))
    {
        format(string, sizeof(string),"%s", dini_Get(str1, "Name2"));
        SendClientMessage(playerid, COLOR_YELLOW, string);
        return 1;
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)