Please Help me Fast! -
ahameed4755 - 03.11.2015
hi im getting some errors.
Code:
PHP код:
#define PATH "AAdmin/Users/%s.ini
enum pData
{
pCash,
pKills,
pDeaths,
pAdmin
}
new PlayerInfo[MAX_PLAYERS][pData];
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Admin",PlayerInfo[playerid][pAdmin]; // error line 20!
INT_Int("Kills",PlayerInfo[playerid][pKills]; // error line 21!
INT_Int("Cash",PlayerInfo[playerid][pCash]; // error line 22!
INT_Int("Deaths",PlayerInfo[playerid][pDeaths]; // error line 23!
return 1;
}
stock UserPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),PATH,playername); // error line 30!
return string;
}
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills];
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_Close(File);
return 1;
}
PHP код:
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(20) : error 017: undefined symbol "INI_Int"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(20) : warning 202: number of arguments does not match definition
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(20) : error 001: expected token: ",", but found ";"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(21) : error 017: undefined symbol "INT_Int"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(21) : warning 202: number of arguments does not match definition
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(21) : error 001: expected token: ",", but found ";"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(22) : error 017: undefined symbol "INT_Int"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(22) : warning 202: number of arguments does not match definition
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(22) : error 001: expected token: ",", but found ";"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(23) : error 017: undefined symbol "INT_Int"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(23) : warning 202: number of arguments does not match definition
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(23) : error 001: expected token: ",", but found ";"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(30) : error 037: invalid string (possibly non-terminated string)
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(30) : error 017: undefined symbol "AAdmin"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(30) : error 017: undefined symbol "s"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(30) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
12 Errors.
Re : Please Help me Fast! -
Buthers - 03.11.2015
You did well included YSI -> Y_Ini ?
Re : Please Help me Fast! -
Buthers - 03.11.2015
You can take YSI on github:
Here
You just have to take the files in the folder pawno/includes/YSI.
Take the YSI folder and place it in your folder pawno/includes.
Re: Please Help me Fast! -
ahameed4755 - 03.11.2015
lol my bad now im getting this 1 error
D:\gta sa\HEHE!\pawno\include\YSI\..\YSI_Storage\y_ini.in c(206) : fatal error 100: cannot read from file: "..\amx\os"
Re : Please Help me Fast! -
Buthers - 03.11.2015
Did you included YSI.inc (in the folder include) ?
If you don't included this, you can take it
here.
You have to place this include at the same place (pawno/place here).
Re: Please Help me Fast! -
ahameed4755 - 03.11.2015
Код:
D:\gta sa\HEHE!\pawno\include\YSI\y_hooks/impl.inc(1755) : error 025: function heading differs from prototype
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(20) : error 017: undefined symbol "INI_Int"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(20) : warning 202: number of arguments does not match definition
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(20) : error 001: expected token: ",", but found ";"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(21) : error 017: undefined symbol "INT_Int"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(21) : warning 202: number of arguments does not match definition
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(21) : error 001: expected token: ",", but found ";"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(22) : error 017: undefined symbol "INT_Int"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(22) : warning 202: number of arguments does not match definition
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(22) : error 001: expected token: ",", but found ";"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(23) : error 017: undefined symbol "INT_Int"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(23) : warning 202: number of arguments does not match definition
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(23) : error 001: expected token: ",", but found ";"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(30) : error 037: invalid string (possibly non-terminated string)
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(30) : error 017: undefined symbol "AAdmin"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(30) : error 017: undefined symbol "s"
D:\gta sa\HEHE!\filterscripts\aadmin.pwn(30) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
13 Errors.
Same Errors..!
Respuesta: Please Help me Fast! -
x3378 - 03.11.2015
Download this
And extracts the content in the following path
Edit:
The first answer from me was to solve the problem of amx/os, you must include the include YSI/INI.
Код:
#include <a_samp>
#include <YSI\y_ini>
#define PATH "AAdmin/Users/%s.ini
enum pData
{
pCash,
pKills,
pDeaths,
pAdmin
}
new PlayerInfo[MAX_PLAYERS][pData];
forward LoadUser_data(playerid,name[],value[]);
public LoadUser_data(playerid,name[],value[])
{
INI_Int("Admin",PlayerInfo[playerid][pAdmin]; // error line 20!
INT_Int("Kills",PlayerInfo[playerid][pKills]; // error line 21!
INT_Int("Cash",PlayerInfo[playerid][pCash]; // error line 22!
INT_Int("Deaths",PlayerInfo[playerid][pDeaths]; // error line 23!
return 1;
}
UserPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playername));
format(string,sizeof(string),PATH,playername); // error line 30!
return string;
}
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills];
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid));
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_Close(File);
return 1;
}
Re: Please Help me Fast! -
ahameed4755 - 03.11.2015
bruh... still same errors....
Re: Please Help me Fast! -
Scottylad - 03.11.2015
Instead of
Put
- Also get #include <dini>
Also do it like this:
Код:
#define PATH "/AAdmin/Users/%s.ini"
Re: Please Help me Fast! -
ahameed4755 - 04.11.2015
Bump.
i did everything still same errors,