28.03.2015, 18:13
Hello.
I am making my job system and i've got some errors which i couldn't fix. So if you could help me i would appreciate.
Job enum:
Saving:
Loading:
Loading - gamemodeinit:
Errors:
lines:
I am making my job system and i've got some errors which i couldn't fix. So if you could help me i would appreciate.
Job enum:
PHP код:
enum pPosao
{
pID, //Job ID
pZaposlen, //employed
pLevel // Skill/exp in job
};
new PlayerPosao[MAX_PLAYERS][pPosao];
PHP код:
new INI:pFile = INI_Open(PosaoPath(playerid));
INI_SetTag(pFile,"data");
INI_WriteInt(pFile,"ID",PlayerPosao[playerid][pID]);
INI_WriteInt(pFile,"Zaposlen",PlayerPosao[playerid][pZaposlen]);
INI_WriteInt(pFile,"Level",PlayerPosao[playerid][pLevel]);
INI_Close(pFile);
PHP код:
public LoadPosao_data(playerid,name[],value[])
{
INI_Int("ID",PlayerPosao[playerid][pID]);
INI_Int("Zaposlen",PlayerPosao[playerid][pZaposlen]);
INI_Int("Level",PlayerPosao[playerid][pLevel]);
return 1;
}
PHP код:
public OnGameModeInit()
INI_ParseFile(PosaoPath(playerid), "LoadPosao_%s", .bExtra = true, .extra = playerid);
PHP код:
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(218) : error 037: invalid string (possibly non-terminated string)
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(218) : error 029: invalid expression, assumed zero
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(218) : error 017: undefined symbol "ini"
C:\Users\Dino Covic\Desktop\SAMP Server\gamemodes\Server_Skripta.pwn(218) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
PHP код:
stock PosaoPath(playerid)
{
new poruka[128],ime[MAX_PLAYER_NAME];
GetPlayerName(playerid,ime,sizeof(ime));
format(poruka,sizeof(poruka),pPATH,ime); // error line
return poruka;
}