20.12.2014, 17:00
So, okay. I just hosted my script in a VPS. I found something weird over there. The server crashes when I register.
It printed nothing in the server log with crashdetect. But the VPS console says this, "samp03svr: amx/amxfile.c:222: fputs_cell: Assertion `fp!=((void *)0)' failed. ash: line 1: 32074 Aborted ./samp03svr". Also the number which is after 'line 1:' is frequently changing upon server restart (and register again).
This is my register dialog. I don't find anything wrong with this. But the VPS support says that this is a script-sided problem and they can't do anything about it.. Someone please help me!
It printed nothing in the server log with crashdetect. But the VPS console says this, "samp03svr: amx/amxfile.c:222: fputs_cell: Assertion `fp!=((void *)0)' failed. ash: line 1: 32074 Aborted ./samp03svr". Also the number which is after 'line 1:' is frequently changing upon server restart (and register again).
pawn Код:
else if(dialogid == RegDialog)
{
if(!response)
{
SendClientMessage(playerid,COL_RED,"You can register anytime by typing /register!");
return 1;
}
if(strlen(inputtext) == 0 || strlen(inputtext) > 24) return ShowPlayerDialog(playerid,RegDialog,1,"Register",""CINFO"Please input a password between "CRED"1 "CINFO" and "CRED"24"CINFO" characters!\n","Register","Play now");
new szPass[100];
mysql_real_escape_string(inputtext,szPass);
new PIP[16],TempQuery[650],TempQuery2[650], day, month, year, hour, minute, second;
GetPlayerIp(playerid,PIP,16);
getdate(year,month,day);
gettime(hour,minute,second);
strcat(TempQuery2,"INSERT INTO `"Users_Table"` (Username, Password, IP, Money, Score, Level, NitroType, Autofix, Fightstyle, SkinID, Color, SB, SSJ, AcceptPM, Kills, Deaths, StuntPoints, StuntDiamonds, StuntsDone, Spawnweap, Hours, Mins, Goto, Spawn, LastOn, AntiFall, RWon, GPFound, DuelWins, MWon, cID, GPos, ReacWon, LottoWon, DerbyWon, Arrests, Robberys, Dontfallswon) VALUES");
strcat(TempQuery2,"('%s', sha1('%s'), '%s', '%i', '%i', '0', '0', '1', '0', '-1', '0', '1', '1', '1', '0', '0', '0', '0', '0', '0', '0', '0', '1','0','%02d.%02d.%02d at %02d:%02d:%02d','1','0', '0', '0','0','0','0','0','0','0','0','0','0')");
format(TempQuery, sizeof TempQuery,TempQuery2 ,GetPName(playerid),szPass,PIP,GetPlayerCash(playerid),GetPlayerScore(playerid), day,month,year,hour,minute,second);
mysql_query(TempQuery);
format(TempQuery, sizeof TempQuery, "INSERT INTO `"Boosts_Table"` (Username, SBoosters1, SBoosters2, SPBoosters1, SPBoosters2, MBoosters1, MBoosters2, NameChanges, Cooldown, KDReset) VALUES ('%s', '0', '0', '0', '0', '0', '0', '0', '0', '0')", GetPName(playerid));
mysql_query(TempQuery);
PutPlayerInAchTab(playerid);
PInfo[playerid][Logged] = 1;
PInfo[playerid][Regged] = 1;
PInfo[playerid][Skin] = -1;
GameTextForPlayer(playerid,"~g~~h~You have received: ~n~~r~~h~+$5000 ~n~~r~~h~1000 SD",5000,3);
TakePlayerCash(playerid,5000);
//SetPlayerScore(playerid,GetPlayerScore(playerid)+1000);
GivePlayerSD(playerid, 1000);
ShowPlayerDialog(playerid,Emaildialog,1,"Email",""CWHITE"For security reason, we ask you to put in an email so you can recover your password in the future: \n","Accept","No Email");
return 1;
}