Dini isn't working - help - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Dini isn't working - help (
/showthread.php?tid=182162)
[HELP]Dini isn't working - help -
CrucixTM - 09.10.2010
So, my dini apparantly does not want to save, load or check for files any more.
I'll supply the relevant pieces of my code.
pawn Код:
#include <a_samp>
#include <dini>
#include <dudb>
#include <gl_common>
#include <a_angles>
#include <streamer>
pawn Код:
public OnPlayerConnect(playerid)
{
if(IsPlayerNPC(playerid)) return IsLogged[playerid] = 1;
// General Variables
IsLogged[playerid] = 0;
IsPlayerOnQuest[playerid] = 0;
PlayerInfo[playerid][AFKStatus] = 0;
PlayerInfo[playerid][Godmode] = 0;
FailedLogins[playerid] = 0;
new file[128];
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
if(strfind(name, "_", true) == -1)
{
new string[128];
format(string,sizeof(string),"» Wrong name format: '%s'",name);
SendClientMessage(playerid, COLOR_RED, "-----------------------------------------------------------------------------------------");
SendClientMessage(playerid, COLOR_WHITE, string);
SendClientMessage(playerid, COLOR_WHITE, "Name must be 'Firstname_Lastname'! Please reconnect with a new name.");
SendClientMessage(playerid, COLOR_RED, "-----------------------------------------------------------------------------------------");
Kick(playerid);
}
format(file,sizeof(file),"Accounts/%s.ini",name);
if(!fexist(file))
{
ShowPlayerDialog(playerid, 1, DIALOG_STYLE_INPUT, "Create an account", "This username is not registered.\n\nPlease choose a password to register.\n\nYour password must be between 5 and 20 letters.\nIt may contain both numbers and letters.", "Register", "Quit");
}
else
{
ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "Login to your account", "This account is registered.\n\nPlease login with your password below.\n\nIf you did not register this account, please press 'Quit'.", "Login", "Quit");
}
return 1;
}
I have made the Accounts folder in the scriptfiles directory. And it worked just fine, untill I changed something in the server.cfg and added NPC's. Now, it does not work.
When I log in, the account name is not registed(even if it is) and when I register it, it does not create a file, nor does it save anything. In other words, dini is fucked, but I have no clue why.
My server.cfg if it matters:
Код:
echo Executing Server Config...
lanmode 1
rcon_password EDITED OUT
maxplayers 30
port 7777
hostname Test
gamemode0 CSRP 1
filterscripts
plugins streamer
announce 0
query 1
maxnpc 20
weburl lolcake.com
Re: Dini isn't working - help -
CrucixTM - 10.10.2010
Almost-24-hours-bump.