errors help! +rep
#1

hello i tried to open the file i need with dini and i got some errors

my code
pawn Код:
stock Paccountid()
{
    new count[26];
    new plusone[26];
    new strings[128];
    foreach (Player, i)
    {
        new count = dini_Get("count.sav", "lastaccountid")
        new plusone = strval(count) + 1;
        PlayerInfo[i][Accountid] = plusone;
        format(strings, sizeof(strings),"%d", plusone);
        dini_Set("count.sav", "lastaccountid", strings);
    }
    return 1;
}
the errors
PHP код:
D:\3x-Rc1-2 Server\Gamemodes\SFTDM.pwn(2156) : warning 219local variable "count" shadows a variable at a preceding level
D
:\3x-Rc1-2 Server\Gamemodes\SFTDM.pwn(2156 -- 2157) : error 033: array must be indexed (variable "-unknown-")
D:\3x-Rc1-2 Server\Gamemodes\SFTDM.pwn(2157) : warning 219local variable "plusone" shadows a variable at a preceding level
D
:\3x-Rc1-2 Server\Gamemodes\SFTDM.pwn(2157) : error 035argument type mismatch (argument 1)
D:\3x-Rc1-2 Server\Gamemodes\SFTDM.pwn(2157) : warning 204symbol is assigned a value that is never used"count"
D:\3x-Rc1-2 Server\Gamemodes\SFTDM.pwn(2152) : warning 204symbol is assigned a value that is never used"plusone"
D:\3x-Rc1-2 Server\Gamemodes\SFTDM.pwn(2151) : warning 204symbol is assigned a value that is never used"count"
Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
2 Errors

P.S : Dont Tell ME To Use YINI Cause That Won't Fix My Code !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!
Reply
#2

PHP код:
stock Paccountid()
{
    new 
count[26];
    new 
strings[128];
    foreach (
Playeri)
    {
        
count dini_Get("count.sav""lastaccountid");
        new 
plusone strval(count) + 1;
        
PlayerInfo[i][Accountid] = plusone;
        
format(stringssizeof(strings),"%d"plusone);
        
dini_Set("count.sav""lastaccountid"strings);
    }
    return 
1;

Try this
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)