define prob
#1

hi i had those errors when compiling

C:\Users\Sybinfo 56\Desktop\samp\pawno\include\YSI\y_hooks/impl.inc(1755) : warning 235: public function lacks forward declaration (symbol "OnUnoccupiedVehicleUpdate")
C:\Users\Sybinfo 56\Desktop\samp\pawno\include\YSI\y_hooks/impl.inc(2336) : warning 235: public function lacks forward declaration (symbol "OnPlayerTakeDamage")
C:\Users\Sybinfo 56\Desktop\samp\pawno\include\YSI\y_hooks/impl.inc(2382) : warning 235: public function lacks forward declaration (symbol "OnPlayerGiveDamage")
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(63) : error 017: undefined symbol "PATH"
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(72) : error 017: undefined symbol "DIALOG_LOGIN"
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(72) : error 017: undefined symbol "WHITE"
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(72) : warning 215: expression has no effect
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(72) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(72) : fatal error 107: too many error messages on one line

here is the script
#if defined FILTERSCRIPT
#define PATH "/URP/Users/%s.ini"
#define WHITE "{FFFFFF}"
#define RED "{F81414}"
#define GREEN "{00FF22}"
#define LIGHTBLUE "{00CED1}"
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4

stock UserPath(playerid)
{
new string[128],playername[MAX_PLAYER_NAME];
GetPlayerName(playerid,playername,sizeof(playernam e));
error line -----> format(string,sizeof(string),PATH,playername);
return string;
}

public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
error----> INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
error----> ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""WHITE"Login",""WHITE"Type your password below to login.","Login","Quit");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""WHITE"Registering...",""WHITE "Type your password below to register a new account.","Register","Quit");
}
return 1;
}
thx for help
Reply
#2

help plz
Reply
#3

Quote:
Originally Posted by mehdi171996
Посмотреть сообщение
C:\Users\Sybinfo 56\Desktop\samp\pawno\include\YSI\y_hooks/impl.inc(1755) : warning 235: public function lacks forward declaration (symbol "OnUnoccupiedVehicleUpdate")
C:\Users\Sybinfo 56\Desktop\samp\pawno\include\YSI\y_hooks/impl.inc(2336) : warning 235: public function lacks forward declaration (symbol "OnPlayerTakeDamage")
C:\Users\Sybinfo 56\Desktop\samp\pawno\include\YSI\y_hooks/impl.inc(2382) : warning 235: public function lacks forward declaration (symbol "OnPlayerGiveDamage")
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(63) : error 017: undefined symbol "PATH"
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(72) : error 017: undefined symbol "DIALOG_LOGIN"
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(72) : error 017: undefined symbol "WHITE"
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(72) : warning 215: expression has no effect
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(72) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(72) : fatal error 107: too many error messages on one line

here is the script
#if defined FILTERSCRIPT
#define PATH "/URP/Users/%s.ini"
#define WHITE "{FFFFFF}"
#define RED "{F81414}"
#define GREEN "{00FF22}"
#define LIGHTBLUE "{00CED1}"
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4
remove the
Код:
#if defined FILTERSCRIPT
all that is only gettin' 'defined' IF you defined 'FILTERSCRIPT' before.
seems like you didn't so you get these errors sayin stuff is not defined. - simple as that.

also, if it weren't too much errors on one line,
you'd also get
Код:
 error 001: expected token: "#endif", but found "-end of file-"
for not closing the "#if" with "#endif"


anyways, just remove "#if defined FILTERSCRIPT"
or actually define it and close the statement after your defines with "#endif".
(only if you really need a way to check whether it's the main GM or a filterscript)

but i'd just remove it, don't need it
Reply
#4

thank you
Now i have just those errors

C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(129 ) : warning 202: number of arguments does not match definition
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(137 ) : warning 217: loose indentation
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(139 ) : error 002: only a single statement (or expression) can follow each "case"
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(139 ) : error 017: undefined symbol "reason"
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(139 -- 141) : error 029: invalid expression, assumed zero
C:\Users\Sybinfo 56\Desktop\samp\gamemodes\UltimateFreeRoam.pwn(139 -- 141) : fatal error 107: too many error messages on one line

[pawno]public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
switch( dialogid )
{
case DIALOG_REGISTER:
{
if (!response) return Kick(playerid);
if(response)
{
if(!strlen(inputtext)) return ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, ""WHITE"Registering...",""RED"You have entered an invalid password.\n"WHITE"Type your password below to register a new account.","Register","Quit");
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Password",udb_hash(inputtext));
INI_WriteInt(File,"Cash",0);
INI_WriteInt(File,"Admin",0);
INI_WriteInt(File,"Kills",0);
INI_WriteInt(File,"Deaths",0);
INI_Close(File);
}
}

case DIALOG_LOGIN:
{
if ( !response ) return Kick ( playerid );
if( response )
{
if(udb_hash(inputtext) == PlayerInfo[playerid][pPass])
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
GivePlayerMoney(playerid, PlayerInfo[playerid][pCash]);
ShowPlayerDialog(playerid, DIALOG_SUCCESS_2, DIALOG_STYLE_MSGBOX,""WHITE"Success!",""GREEN"You have successfully logged in!","Ok");
}
else
{
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""WHITE"Login",""RED"You have entered an incorrect password.\n"WHITE"Type your password below to login.","Login","Quit");
}
return 1;
}
return 1;
}
public OnPlayerDisconnect(playerid, reason)
{
new INI:File = INI_Open(UserPath(playerid));
INI_SetTag(File,"data");
INI_WriteInt(File,"Cash",GetPlayerMoney(playerid)) ;
INI_WriteInt(File,"Admin",PlayerInfo[playerid][pAdmin]);
INI_WriteInt(File,"Kills",PlayerInfo[playerid][pKills]);
INI_WriteInt(File,"Deaths",PlayerInfo[playerid][pDeaths]);
INI_Close(File);
return 1;
}[/pawno]
Reply
#5

thank you
solved
id just forget

}
return 1;
}
}
}
return 1;
}
Reply
#6

Quote:
Originally Posted by mehdi171996
Посмотреть сообщение
thank you
solved
id just forget

}
return 1;
}
}
}
return 1;
}
take note that OnDialogResponse should return 0 not 1
return 1 indicates that some dialog was being processed.
but if it's 0, the callback got called without processing a dialog.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)