Help! +rep if you help me
#1

My loading users is kind of bugged:
I get this error :
Код:
 C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Gamemode.pwn(160) : error 001: expected token: ")", but found "["
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Gamemode.pwn(160) : warning 215: expression has no effect
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Gamemode.pwn(160) : error 001: expected token: ";", but found "]"
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Gamemode.pwn(160) : error 029: invalid expression, assumed zero
C:\Users\Callum.Acer\Desktop\Scripting extra\gamemodes\Gamemode.pwn(160) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.
Code:
Код:
public loadaccount_user(playerid, name[], value[])
{
    INI_String("Password", PlayerInfo[playerid][pPass],129); // LINE 160
    INI_Int("pAdmin",PlayerInfo[playerid][pAdmin]);
    INI_Int("pMoney",PlayerInfo[playerid][pMoney]);
    INI_Int("pLevels",PlayerInfo[playerid][pLevels]);
    INI_Int("Factions",PlayerInfo[playerid][Factions]);
    return 1;
}
Enum:

Код:
enum pInfo
{
   pName,
   pPass,
   pMoney,
   Float:pX,
   Float:pY,
   Float:pZ,
   pAdmin,
   pLevels,
   pMod
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Reply
#2

Didnt tested it couse im with phone...
pawn Код:
public loadaccount_user(playerid, name[], value[])
{
    INI_Int("Password", PlayerInfo[playerid][pPass]); // LINE 160
    INI_Int("pAdmin",PlayerInfo[playerid][pAdmin]);
    INI_Int("pMoney",PlayerInfo[playerid][pMoney]);
    INI_Int("pLevels",PlayerInfo[playerid][pLevels]);
    INI_Int("Factions",PlayerInfo[playerid][Factions]);
    return 1;
}
Reply
#3

pawn Код:
enum pInfo
{
   pName,
   pPass[129], //You had to add it a string because you used a string method, plus Password is a string.
                    //Also make sure the array size and the size you define in the ini thing are the same.
   pMoney,
   Float:pX,
   Float:pY,
   Float:pZ,
   pAdmin,
   pLevels,
   pMod
}
new PlayerInfo[MAX_PLAYERS][pInfo];
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)