Undefined symbol for things I defined.... -
Calvingreen17 - 17.07.2013
I get undefined symbol error:
Код:
C:\Users\di$t0rt3d_p1ctur3\Saved Games\GTA San Andreas\Server\gamemodes\coolbeans.pwn(482) : error 017: undefined symbol "Path"
C:\Users\di$t0rt3d_p1ctur3\Saved Games\GTA San Andreas\Server\gamemodes\coolbeans.pwn(484) : error 017: undefined symbol "Path"
These are the parts of the code that get the error:
Код:
//Register/Login
if(fexist(Path(playerid)))
{
INI_ParseFile(Path(playerid),"loadaccount_%s",.bExtra = true,.extra = playerid);
ShowPlayerDialog(playerid,10,DIALOG_STYLE_INPUT,"Login","Please put in your password to login","Login","Quit");
}
else
{
ShowPlayerDialog(playerid,11,DIALOG_STYLE_INPUT,"Register","Welcome to Cool Beans\nBefore playing, please register an account. Thanks.","Register","Quit");
}
return 1;
}
It says I dont have "Path" defined but I do......
Код:
#define UserPath "Users/%s.ini"
The worst part is, it does the same exact thing for color codes. If I use COLOR_WHITE, it will give me the same error, so I have to use the raw code (like 0xFFFFFFAA).
Help please D:
Re: Undefined symbol for things I defined.... -
gtakillerIV - 17.07.2013
You have USERPath not Path
#define UserPath "Users/%s.ini"
Should Be:
#define Path "Users/%s.ini"
Huge difference Between UserPath and Path.
Re: Undefined symbol for things I defined.... -
Calvingreen17 - 17.07.2013
Ouch, I forgot to mention I have a stock for Path:
Код:
stock Path(playerid)
{
new str[128],name[MAX_PLAYER_NAME];
GetPlayerName(playerid,name,sizeof(name));
format(str,sizeof(str),UserPath,name);
return str;
}
Re: Undefined symbol for things I defined.... -
Calvingreen17 - 18.07.2013
nvm it was fixed but I have another error:
Код:
C:\Users\di$t0rt3d_p1ctur3\Saved Games\GTA San Andreas\Server\gamemodes\coolbeans.pwn(714) : error 076: syntax error in the expression, or invalid function call
Line 714:
Код:
format(string,sizeof(string),"%s %s (%d)",arank,name,playerid);
For arank, I made a stock:
Код:
stock arank(playerid)
{
new string[128];
{
if(pInfo[playerid][AdmLevel] == 1)
format(string,sizeof(string),"Jr Moderator");
{
if(pInfo[playerid][AdmLevel] == 2)
format(string,sizeof(string),"Moderator");
{
if(pInfo[playerid][AdmLevel] == 3)
format(string,sizeof(string),"Admin");
{
if(pInfo[playerid][AdmLevel] == 4 || if(IsPlayerAdmin(playerid));
format(string,sizeof(string),"Server Owner");
}
}
}
}
return arank;
}
Re: Undefined symbol for things I defined.... -
Djole1337 - 18.07.2013
pawn Код:
stock arank(playerid)
{
new
iStr[12]
;
switch (pInfo[playerid][AdmLevel])
{
case 1: iStr = "Jr Moderator";
case 2: iStr = "Moderator";
case 3: iStr = "Admin";
case 4: iStr = "Server Owner";
}
return iStr;
}
Re: Undefined symbol for things I defined.... -
Calvingreen17 - 18.07.2013
C:\Users\di$t0rt3d_p1ctur3\Saved Games\GTA San Andreas\Server\gamemodes\coolbeans.pwn(697) : error 076: syntax error in the expression, or invalid function call
Re: Undefined symbol for things I defined.... -
Kirollos - 18.07.2013
pawn Код:
format(string,sizeof(string),"%s %s (%d)",arank(playerid),name,playerid);
note that u have to use the stock of the guy above me because yours wont work.
Re: Undefined symbol for things I defined.... -
Calvingreen17 - 18.07.2013
Compiled with no errors but it still said no admins online