SA-MP Forums Archive
3 Errors - "/Clans" - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: 3 Errors - "/Clans" (/showthread.php?tid=439369)



3 Errors - "/Clans" - EitayEliyahu - 25.05.2013

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));



Re: 3 Errors - "/Clans" - mahdi499 - 25.05.2013

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%


Re: 3 Errors - "/Clans" - EitayEliyahu - 25.05.2013

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..


Re: 3 Errors - "/Clans" - mahdi499 - 25.05.2013

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);
        }  
    }
}



Re: 3 Errors - "/Clans" - EitayEliyahu - 25.05.2013

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


Re: 3 Errors - "/Clans" - EitayEliyahu - 25.05.2013

UP 11111


Re: 3 Errors - "/Clans" - EitayEliyahu - 25.05.2013

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));



Re: 3 Errors - "/Clans" - Knappen - 25.05.2013

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


Re: 3 Errors - "/Clans" - EitayEliyahu - 25.05.2013

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..


Re: 3 Errors - "/Clans" - EitayEliyahu - 26.05.2013

UP!!!!