3 Errors - "/Clans"
#1

Code:
pawn Код:
if(!strcmp(cmd,"/Clans",true))
{
    SendClientMessage(playerid, yellow, "!•••••• Clans ••••••!");
    new count, clfile[64];


        for(new id; id < 256; id++) if(dini_Isset("TUsers/Clans/Clans.ini", id))
        {
        format(clfile,sizeof(clfile),"TUsers/Clans/Clans.ini", dini_Get("TUsers/Clans/Clans.ini", id));
        if(dini_Exists(clfile))
        {
            count++;
            format(str, sizeof(str), "%d. %s",count, dini_Get("TUsers/Clans/Clans.ini", id));
            SendClientMessage(playerid, orange, str);
        }
    }
    if(count == 0)
        SendClientMessage(playerid, yellow, "айп чмарйн");
    return 1;
}
Errors:
pawn Код:
C:\Users\Eliyahu\Desktop\server\gamemodes\MegaDeathMatch.pwn(6435) : error 035: argument type mismatch (argument 2)
C:\Users\Eliyahu\Desktop\server\gamemodes\MegaDeathMatch.pwn(6437) : error 035: argument type mismatch (argument 2)
C:\Users\Eliyahu\Desktop\server\gamemodes\MegaDeathMatch.pwn(6441) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


3 Errors.
Lines:
pawn Код:
for(new id; id < 256; id++) if(dini_Isset("TUsers/Clans/Clans.ini", id))
 format(clfile,sizeof(clfile),"TUsers/Clans/Clans.ini", dini_Get("TUsers/Clans/Clans.ini", id));
 format(str, sizeof(str), "%d. %s",count, dini_Get("TUsers/Clans/Clans.ini", id));
Reply
#2

pawn Код:
for(new id; id < 256; id++) if(dini_Isset("TUsers/Clans/Clans.ini", id))
Try using
pawn Код:
for(new id = 0; id < 256; id++) if(dini_Isset("TUsers/Clans/Clans.ini", id))
So it loops from 0 100%
Reply
#3

Quote:
Originally Posted by mahdi499
Посмотреть сообщение
pawn Код:
for(new id; id < 256; id++) if(dini_Isset("TUsers/Clans/Clans.ini", id))
Try using
pawn Код:
for(new id = 0; id < 256; id++) if(dini_Isset("TUsers/Clans/Clans.ini", id))
So it loops from 0 100%
the error has not changed..
Reply
#4

Stupid me how haven't i noticed, I beleive it's more like
pawn Код:
for(new id = 0; id < 256; id++)
{
    if(dini_Isset("TUsers/Clans/Clans.ini", id))
    {
    format(clfile,sizeof(clfile),"TUsers/Clans/Clans.ini", dini_Get("TUsers/Clans/Clans.ini", id));
        if(dini_Exists(clfile))
        {
            count++;
            format(str, sizeof(str), "%d. %s",count, dini_Get("TUsers/Clans/Clans.ini", id));
            SendClientMessage(playerid, orange, str);
        }  
    }
}
Reply
#5

Quote:
Originally Posted by mahdi499
Посмотреть сообщение
Stupid me how haven't i noticed, I beleive it's more like
pawn Код:
for(new id = 0; id < 256; id++)
{
    if(dini_Isset("TUsers/Clans/Clans.ini", id))
    {
    format(clfile,sizeof(clfile),"TUsers/Clans/Clans.ini", dini_Get("TUsers/Clans/Clans.ini", id));
        if(dini_Exists(clfile))
        {
            count++;
            format(str, sizeof(str), "%d. %s",count, dini_Get("TUsers/Clans/Clans.ini", id));
            SendClientMessage(playerid, orange, str);
        }  
    }
}
sry, but its still not changed.. :S
Reply
#6

UP 11111
Reply
#7

i'v fixed a 2 errors, now need to fix 1 more!!!
pawn Код:
if(!strcmp(cmd,"/Clans",true))
{
    SendClientMessage(playerid, yellow, "!•••••• Clans ••••••!");
    new count, clfile[64];
        new id, check[64];
        valstr(check, id);
        while(dini_Isset("TUsers/Clans/Clans.ini", check)) {
        id++;
        valstr(check, id);
            format(clfile,sizeof(clfile),"TUsers/Clans/Clans.ini");
                if(dini_Exists(clfile))
                {
                    count++;
                    format(str, sizeof(str), "%d. %s",count, dini_Get(ClanList,count));
                    SendClientMessage(playerid, orange, str);
                }
      }
    if(count == 0)
        SendClientMessage(playerid, yellow, "айп чмарйн");
    return 1;
}
Error:
pawn Код:
C:\Users\Eliyahu\Desktop\server\gamemodes\MegaDeathMatch.pwn(6443) : error 076: syntax error in the expression, or invalid function call
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
Line:
pawn Код:
format(str, sizeof(str), "%d. %s",count, dini_Get("TUsers/Clans/Clans.ini",count));
Reply
#8

Shouldn't those slashes be the other way around, like this?

pawn Код:
format(str, sizeof(str), "%d. %s",count, dini_Get("TUsers\Clans\Clans.ini",count));
Just saying
Reply
#9

Quote:
Originally Posted by Knappen
Посмотреть сообщение
Shouldn't those slashes be the other way around, like this?

pawn Код:
format(str, sizeof(str), "%d. %s",count, dini_Get("TUsers\Clans\Clans.ini",count));
Just saying
no its dont change..
Reply
#10

UP!!!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)