SA-MP Forums Archive
Help! +rep if you help me - 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: Help! +rep if you help me (/showthread.php?tid=537245)



Help! +rep if you help me - MrCallum - 14.09.2014

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



Re: Help! +rep if you help me - SHE790 - 14.09.2014

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



Re: Help! +rep if you help me - Ox1gEN - 14.09.2014

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