Quote:
Originally Posted by Dan.
Huh, hello again Kush, I keep having problems with your REGISTER/LOGIN scripts, take a look at this:
pawn Code:
(242) : error 017: undefined symbol "UserPath" (244) : error 017: undefined symbol "UserPath" (245) : error 017: undefined symbol "DIALOG_LOGIN" (245) : warning 215: expression has no effect (245) : error 001: expected token: ";", but found "-string-" (245) : warning 215: expression has no effect (245) : error 001: expected token: "-string end-", but found "-identifier-" (245) : fatal error 107: too many error messages on one line
And here are the lines:
pawn Code:
public OnPlayerConnect(playerid) { if(fexist(UserPath(playerid))) // 242 { INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid); // 244 ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit"); //245 } else { ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit"); } return 1; }
I guess the errors are because DIALOG_LOGIN and UserPath are not defined, but take a look at this:
pawn Code:
// Register system things #define DIALOG_REGISTER 1 #define DIALOG_LOGIN 2 #define DIALOG_SUCCESS_1 3 #define DIALOG_SUCCESS_2 4
#define UserPath "/Users/%s.ini"
The #define UserPath was "PATH" before.. changed it but still the same thing, so maybe you could help. And dont offer me your pastebin version, not going to copy my whole script into there, so some help, please.
|
I will show you mine.
pawn Code:
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4
#define PATH "/Users/%s.ini"
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
#define COLOR_RED 0xAA3333AA
#define COLOR_LIGHTBLUE 0x00BFFFFF
pawn Code:
public OnPlayerConnect(playerid)
{
if(fexist(UserPath(playerid)))
{
INI_ParseFile(UserPath(playerid), "LoadUser_%s", .bExtra = true, .extra = playerid);
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT,""COL_WHITE"Login",""COL_WHITE"Type your password below to login.","Login","Quit");
}
else
{
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT,""COL_WHITE"Registering...",""COL_WHITE"Type your password below to register a new account.","Register","Quit");
}
return 1;
}
Make sure you have your includes correct.
Only an idiot cant fuck this up.