[Ajuda] Server caindo
#1

Fiz um comando testei antes de Colocar na VPS, Tava funcionando Normalmente.
Coloquei na VPS e quando executo o Comando, O Servidor Reinicia.
Criei as Pastas Necessбrias em scriptfiles, e nd resolve.
Se alguem Puder me ajudar. +rep
Reply
#2

Quote:
Originally Posted by R3connect
Посмотреть сообщение
Fiz um comando testei antes de Colocar na VPS, Tava funcionando Normalmente.
Coloquei na VPS e quando executo o Comando, O Servidor Reinicia.
Criei as Pastas Necessбrias em scriptfiles, e nd resolve.
Se alguem Puder me ajudar. +rep
Mande o cуdigo do comando.
Reply
#3

Quote:
Originally Posted by testi_man
Посмотреть сообщение
Mande o cуdigo do comando.
Como falei, o Comando estб testado. Funcionando Normalmente fora do vps.
Sу q quando coloquei o CMD No Painel no Host, Quando executo-o, o Servidor reinicia.
Reply
#4

Amigo, tem como mandar print do comando?, assim nгo dб pra ajudar, ou entгo poste aqui o log que aparece na VPS
Reply
#5

Quote:

CMD:editarlinha1(playerid, params[])
{
if (APlayerData[playerid][PlayerLevel] < 7) return SendClientMessage(playerid, 0xFF0000FF, "{FF0000}[ERRO]: Vocк nгo tem permissгo para isso!");
new OtherPlayer, Linha1, Msg[128], Name[24], AdminName[24], String[128];
//new OldLevel;
if (APlayerData[playerid][LoggedIn] == true)
{
if (sscanf(params, "ui", OtherPlayer, Linha1))return SendClientMessage(playerid, 0xCECECEFF, "Use: /editarlinha1 [ID] [STATUS]"), SendClientMessage(playerid, 0xCECECEFF, "Use o comando para editar Linha de comandos de um admin.");
{
if (IsPlayerConnected(OtherPlayer))
{

if(Linha1 < 0 || Linha1 > 1)
{
format(Msg, sizeof(Msg), "{FFFF00}[ERRO]: {FF0000}Status Invбlido(0 б 1).", Linha1);
SendClientMessage(playerid, -1, Msg);
return 1;
}
//OldLevel = APlayerData[OtherPlayer][PlayerLevel];
GetPlayerName(playerid, AdminName, sizeof(AdminName));
GetPlayerName(OtherPlayer, Name, sizeof(Name));
APlayerData[OtherPlayer][PlayerLinha1] = Linha1;
new StringContas[100];
format(StringContas, sizeof StringContas, "ServerData/FunзхesAdmin/%s.sav", rNome(OtherPlayer));
if(!DOF2_FileExists(StringContas)) {
DOF2_CreateFile(StringContas);
}
DOF2_SetInt(StringContas, "Admin", Linha1);
if(Linha1 == (0)) {
TirarAdmin(OtherPlayer);
}
SalvarDados(OtherPlayer);
format(Msg, 128, "Sua Linha de comandos 1 Foi Editada pelo admin %s.(STATUS %i)", rNome(playerid), Linha1);
SendClientMessage(OtherPlayer, 0x38FF06FF, Msg);
SendClientMessage(OtherPlayer, 0x38FF06FF, "");
format(Msg, 128, "[INFO] Vocк Editou a Linha de Comandos 1 do player %s para %i", Name, Linha1);
//format(String,sizeof(String), "{00B2EE}[BTISTAFF] O Administrador %s Deu Admin Level %i para %s ",AdminName, Level, Name);
//SendClientMessageToAll(-1, String);
SendClientMessage(playerid, 0x38FF06FF, Msg);//[INFO] Vocк alterou o level deste player com sucesso.
getdate(Ano, Mes, Dia);
gettime(Hora, Minuto, Segundo);
format(String,sizeof(String), "Player %s Editou Linha 1 (STATUS %i) para o player %s DATA: %d/%d/%d Hora: %d:%d:%d", AdminName, Linha1, Name, Dia, Mes, Ano, Hora, Minuto, Segundo);
EscreverLog("Logs/SetouLinha.log", String);
PlayerFile_Save(OtherPlayer);
}
else SendClientMessage(playerid, 0xFF0000FF, "{FFFF00}[ERRO] {BEBEBE}ID invalido");
}
}
return 1;
}

Nos Logs n tem nada.

Quote:

[18:51:50] [join] _Sr.C4psLocK has joined the server (0:45.4.59.151)

----------
Loaded log file: "server_log.txt".
----------

SA-MP Dedicated Server
----------------------
v0.3.7-R2, ©2005-2015

Sу mostra eu Connectando e o Servidor reiniciando Quando Executo o comando.
Reply
#6

Olб recomendo utilizar a plugin crashdetect para verificar oque estб causando o crash, recomendo tambйm abrir um ticket informando o problema para a empresa a qual vocк contratou seu servidor vps.

Cordialmente, BlastHosting.
Reply
#7

Quote:

[19:57:32] [debug] Server crashed while executing gamemode0.amx

[19:57:32] [debug] AMX backtrace:

[19:57:32] [debug] #0 native fclose () from samp03svr

[19:57:32] [debug] #1 000079d4 in ?? (7309928, 7191836) from gamemode0.amx

[19:57:32] [debug] #2 002b78e4 in public cmd_editarlinha1 (0, 7191820) from gamemode0.amx

[19:57:32] [debug] #3 native CallLocalFunction () from samp03svr

[19:57:32] [debug] #4 0000084c in public OnPlayerCommandText (0, 719174 from gamemode0.amx

[19:57:32] [debug] Native backtrace:

[19:57:32] [debug] #0 f7334ca0 in _Z13GetStackTraceRSt6vectorI10StackFrameSaIS0_EEPv () from plugins/crashdetect.so

[19:57:32] [debug] #1 f732dd22 in _ZN11CrashDetect20PrintNativeBacktraceERSoPv () from plugins/crashdetect.so

[19:57:32] [debug] #2 f732e314 in _ZN11CrashDetect20PrintNativeBacktraceEPv () from plugins/crashdetect.so

[19:57:32] [debug] #3 f7330964 in _ZN11CrashDetect11OnExceptionEPv () from plugins/crashdetect.so

[19:57:32] [debug] #4 f73345cd in ?? () from plugins/crashdetect.so

[19:57:32] [debug] #5 f7746cc0 in ?? ()

[19:57:32] [debug] #6 f745a506 in fclose () from /lib/i386-linux-gnu/libc.so.6

[19:57:32] [debug] #7 0809bd64 in ?? () from samp03svr

[19:57:32] [debug] #8 080950e4 in ?? () from samp03svr

[19:57:32] [debug] #9 f732f7b3 in _ZN11CrashDetect13DoAmxCallbackEiPiS0_ () from plugins/crashdetect.so

[19:57:32] [debug] #10 00000003 in ?? () from �
ta aн.
Reply
#8

Vб atй a linha do cуdigo com problema na callback cmd_editarlinha1 e corrija o cуdigo para verificar se a abertura do arquivo foi realizada com sucesso.

Код:
// Open "file.txt" in "append only" mode
new File:handle = fopen("file.txt", io_append);
 
// Check, if file is open
if(handle)
{
	// Success
 
	// Write "Hi there!" into the file
	fwrite(handle, "Hi there!");
 
	// Close the file
	fclose(handle);
}
else
{
	// Error
	print("Failed to open file \"file.txt\".");
}
A utilizaзгo correta seria afim de prevenir problemas com crashes seria como descrito no Wiki.
https://sampwiki.blast.hk/wiki/Fclose

No caso, vocк deveria verificar se o arquivo aberto na callback mencionada estб criado corretamente na pasta scriptfiles e seus derivados.
Reply
#9

Tenta fazer debug, jб tive esse tipo de problemas de funcionar no pc e na vps/host nгo.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)