dini_Get help?
#1

Well I am getting this error with this code?
pawn Код:
public OnPlayerSpawn(playerid)
{
    new file[128];
   
    if (dini_Get(file, "Accounts/%s.ini"))
    {
        SetPlayerSkin(playerid, NoobSkin);
        SetPlayerPos(playerid, 1298.1400,220.3873,19.5547);
    }
    return 1;
}
Error;
Код:
C:\Users\BooNii3\Foxx RP\Foxx Role Play\Server\gamemodes\foxxrp.pwn(92) : error 033: array must be indexed (variable "dini_Get")
Reply
#2

You can't do a format operator (%) without using the actual "format".

You will need to make a string array or something:
pawn Код:
new str[80];
format(str, sizeof(str), "Accounts/%s.ini", playername);
if(dini_Get(file, str))
etc
Reply
#3

Still getting the Error, I don't understand how it is meant to be, I am never used dini_Get before..
Reply
#4

Quote:
Originally Posted by -Luis
Посмотреть сообщение
Well I am getting this error with this code?
pawn Код:
public OnPlayerSpawn(playerid)
{
    new file[128];
   
    if (dini_Get(file, "Accounts/%s.ini"))
    {
        SetPlayerSkin(playerid, NoobSkin);
        SetPlayerPos(playerid, 1298.1400,220.3873,19.5547);
    }
    return 1;
}
Error;
Код:
C:\Users\BooNii3\Foxx RP\Foxx Role Play\Server\gamemodes\foxxrp.pwn(92) : error 033: array must be indexed (variable "dini_Get")
pawn Код:
public OnPlayerSpawn(playerid)
{
new file[128];
format(file, sizeof(file), "Accounts/%s.ini", NameOfThePlayer);
    if (dini_Isset(file, "Skin"))
    {
        SetPlayerSkin(playerid, dini_Int(file, "Skin")); // set the skin to the saved skin ID
        SetPlayerPos(playerid, 1298.1400,220.3873,19.5547);
    }
    return 1;
}
I think this should be go.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)