#include <a_samp>
#include <djson>
#include <dudb>
#define COLOR_WHITE 0xFFFFFFFF
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
new str[128], accname[128];
format(accname, sizeof(accname), "Accounts/%s", GetPlayerName(playerid));
if(!fexist(accname))
{
format(str, 128, "{FFFFFF}Welcome {FBFF00}%s \n\n{FFFFFF}Please Register!", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registration", str, "Register", "Quit");
}
if(fexist(accname))
{
format(str, 128, "{FFFFFF}Welcome\nAccount {FBFF00} %s\n{FFFFFF}Please Log In!", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Log In!", str, "Login", "Quit");
}
new accname[128], str[128];
format(accname, sizeof(accname), "Accoutns/%s", GetPlayerName(playerid));
if(dialogid == DIALOG_REGISTER)
{
if(!response) return Kick(playerid);
if(response)
{
if(strlen(inputtext) == 0)
{
format(str, 128, "{FFFFFF}Welcome {FBFF00}%s \n\n{FFFFFF}Please Register!", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_REGISTER, DIALOG_STYLE_INPUT, "Registration", str, "Register",
return 0;
}
if(!fexist(accname))
{
djCreateFile(accname);
djSetInt(accname,"player/password",udb_hash(inputtext),false);
djCommit(accname);
format(str, 128, "{FFFFFF}Welcome\nAccount {FBFF00} %s\n{FFFFFF}Please Log In!", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Log In!", str, "Login", "Quit");
}
}
}
if(dialogid == DIALOG_LOGIN)
{
if(!response) return Kick(playerid);
if(response)
{
if(strlen(inputtext) == 0)
{
format(str, 128, "{FFFFFF}Welcome\nAccount {FBFF00} %s\n{FFFFFF}Please Log In!", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Log In!", str, "Login", "Quit");
return 0;
}
if(fexist(accname))
{
new password = djInt(accname,"player/password");
if(udb_hash(inputtext) != password)
{
format(str, 128, "{FFFFFF}Welcome\nAccount {FBFF00} %s\n{FFFFFF}Please Log In!", GetName(playerid));
ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_INPUT, "Log In!", str, "Login", "Quit");
}
else
{
SendClientMessage(playerid, colorGreen, "You have successfully logged in.");
SpawnPlayer(playerid);
//Put here for example restoring player money after reloging :D
}
}
}
}
return 1;
}
Hello, i just got this error?
C:\Users\vMikkelReimer\Desktop\SaC\gamemodes\SaC v0,2.pwn(36) : fatal error 100: cannot read from file: "djson" Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |
C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(45) : warning 225: unreachable code C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(46) : error 017: undefined symbol "playerid" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(49) : error 017: undefined symbol "GetName" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(50) : error 017: undefined symbol "playerid" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(54) : error 017: undefined symbol "GetName" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(55) : error 017: undefined symbol "playerid" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(245) : warning 202: number of arguments does not match definition C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(245) : warning 202: number of arguments does not match definition C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(254) : error 017: undefined symbol "GetName" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(255 -- 256) : error 029: invalid expression, assumed zero C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(256) : warning 215: expression has no effect C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(263) : error 017: undefined symbol "GetName" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(275) : warning 203: symbol is never used: "djson_GameModeExit" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(275) : warning 203: symbol is never used: "djson_GameModeInit" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(275) : warning 203: symbol is never used: "ret_memcpy" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors.
Urmm? ;/?
Code:
C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(45) : warning 225: unreachable code C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(46) : error 017: undefined symbol "playerid" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(49) : error 017: undefined symbol "GetName" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(50) : error 017: undefined symbol "playerid" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(54) : error 017: undefined symbol "GetName" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(55) : error 017: undefined symbol "playerid" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(245) : warning 202: number of arguments does not match definition C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(245) : warning 202: number of arguments does not match definition C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(254) : error 017: undefined symbol "GetName" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(255 -- 256) : error 029: invalid expression, assumed zero C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(256) : warning 215: expression has no effect C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(263) : error 017: undefined symbol "GetName" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(275) : warning 203: symbol is never used: "djson_GameModeExit" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(275) : warning 203: symbol is never used: "djson_GameModeInit" C:\Documents and Settings\Administrator\Desktop\Stunt Server\gamemodes\stuntage101.pwn(275) : warning 203: symbol is never used: "ret_memcpy" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 8 Errors. |
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])