Пофиксить логи

Rutamaqyg

Участник
Сообщения
142
Реакции
2
Матерная речь
Народ, у кого есть настроение помочь разобраться с логами?Есть сервер, но там пипец,буду рад услышать решение любой проблемы
 

Вложения

  • errors_20170806.txt
    9 КБ · Просмотры: 5
Последнее редактирование:

Rostu

Добрая душа
Сообщения
986
Реакции
623
@Rutamaqyg, Ну и остались у вас 2 ошибки. для одной из них нужен [PlayersLife.Ru]autochangemap.sp а для другой просто пополнить баланс токенов.
 

Rutamaqyg

Участник
Сообщения
142
Реакции
2
@Rutamaqyg, Ну и остались у вас 2 ошибки. для одной из них нужен [PlayersLife.Ru]autochangemap.sp а для другой просто пополнить баланс токенов.
Разве?А как же ошибки
L 08/06/2017 - 10:32:10: [SM] Exception reported: Invalid timer handle a08035e (error 3)
L 08/06/2017 - 15:53:28: [SM] Exception reported: Array index is out of bounds

L 08/06/2017 - 15:52:44: [SM] [5] Line 2171, E:\scripting\sourcebans.sp::CheckLoadAdmins
L 08/06/2017 - 15:52:44: [SM] [6] Line 1755, E:\scripting\sourcebans.sp::GroupsDone
и т.д.Я воопше плохо разбираюсь, просто думал, что все, что есть в логах-ошибка, все надо фиксить
 

Rostu

Добрая душа
Сообщения
986
Реакции
623
@Rutamaqyg,
L 08/06/2017 - 15:52:44: [SM] [5] Line 2171, E:\scripting\sourcebans.sp::CheckLoadAdmins
L 08/06/2017 - 15:52:44: [SM] [6] Line 1755, E:\scripting\sourcebans.sp::GroupsDone
Данную ошибку вызывал плагин gv.smx но так как вы его удалили больше проблем нет.

08/06/2017 - 10:32:10: [SM] Exception reported: Invalid timer handle a08035e (error 3)
L 08/06/2017 - 15:53:28: [SM] Exception reported: Array index is out of bounds
@Rutamaqyg, нужен [PlayersLife.Ru]autochangemap.sp
 

Rostu

Добрая душа
Сообщения
986
Реакции
623
@Rutamaqyg, Может так?
PHP:
#pragma semicolon 1
#include <sourcemod>
#pragma tabsize 0
#pragma newdecls required
Handle g_hTimer,
    new_map,
    map_idle_time,
    Timelimit_H,
    Command_S,
    PlayersC;
int status;

public Plugin myinfo =
{
    name = "Auto change map",
    author = "Mleczam",
    description = "Change the map if there are no players on the server for a defined time",
    version = "1.3",
    url = "http://www.sect-of-death.com.pl/"
}

public void OnPluginStart()
{
      Command_S = CreateConVar("sm_cm_command","sm_setnextmap","When mp_timelimit is not 0 uses this command - use ma_setnextmap for MAP or sm_setnextmap for sourcemod");
      map_idle_time = CreateConVar("sm_cm_idlechange","5","When no players after this time server changes the map");
      new_map = CreateConVar("sm_cm_nextmap","de_dust2","Name of the map for change without .bsp");
      PlayersC = CreateConVar("sm_cm_players","6","How many players should by to change the map");
      Timelimit_H = FindConVar("mp_timelimit");
      AutoExecConfig(true, "autochangemap");
      status = 0;
}

public void OnMapStart()
{
      g_hTimer = CreateTimer(60.0, sprawdz ,0, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
      status = 0;
}

public Action sprawdz(Handle Timer)
{
      int ccount;
      int NOfClients = GetClientCount(true);
      for (int i = 1; i <= NOfClients ; i++)
         if (IsClientInGame(i) && !IsFakeClient(i))
         {
            ccount++;
         }
      if( ccount > GetConVarFloat(PlayersC) || status)
        return Plugin_Handled;
        KillTimer(g_hTimer);
      g_hTimer = null;
      g_hTimer = CreateTimer(GetConVarFloat(map_idle_time)*60, sprawdz2);
      return Plugin_Handled;
}

public Action sprawdz2(Handle Timer)
{
      char str[128];
      char mapname[128];
      char command_s[64];
      int ccount;
      int NOfClients = GetClientCount(true);
      g_hTimer = null;
      for (int i = 1; i <= NOfClients; i++)
         if (IsClientInGame(i) && !IsFakeClient(i))
         {
            ccount++;
         }
      
      if( ccount > GetConVarFloat(PlayersC) )
      {
          g_hTimer = CreateTimer(60.0, sprawdz ,_, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
          return Plugin_Handled;
      }
      else
      {
          GetCurrentMap(mapname,sizeof(mapname));
          GetConVarString(new_map, str, sizeof(str));
          if( strcmp(mapname, str, false) )
          {
            if( IsMapValid(str) ) ServerCommand("changelevel %s",str);
            return Plugin_Handled;
          }
          else if(GetConVarFloat(Timelimit_H))
          {
            GetConVarString(Command_S,command_s,sizeof(command_s));
            ServerCommand("%s %s",command_s,str);
            status = 1;
          }
      }
      return Plugin_Handled;
}
 

Rutamaqyg

Участник
Сообщения
142
Реакции
2
@Rutamaqyg, Может так?
PHP:
#pragma semicolon 1
#include <sourcemod>
#pragma tabsize 0
#pragma newdecls required
Handle g_hTimer,
    new_map,
    map_idle_time,
    Timelimit_H,
    Command_S,
    PlayersC;
int status;

public Plugin myinfo =
{
    name = "Auto change map",
    author = "Mleczam",
    description = "Change the map if there are no players on the server for a defined time",
    version = "1.3",
    url = "http://www.sect-of-death.com.pl/"
}

public void OnPluginStart()
{
      Command_S = CreateConVar("sm_cm_command","sm_setnextmap","When mp_timelimit is not 0 uses this command - use ma_setnextmap for MAP or sm_setnextmap for sourcemod");
      map_idle_time = CreateConVar("sm_cm_idlechange","5","When no players after this time server changes the map");
      new_map = CreateConVar("sm_cm_nextmap","de_dust2","Name of the map for change without .bsp");
      PlayersC = CreateConVar("sm_cm_players","6","How many players should by to change the map");
      Timelimit_H = FindConVar("mp_timelimit");
      AutoExecConfig(true, "autochangemap");
      status = 0;
}

public void OnMapStart()
{
      g_hTimer = CreateTimer(60.0, sprawdz ,0, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
      status = 0;
}

public Action sprawdz(Handle Timer)
{
      int ccount;
      int NOfClients = GetClientCount(true);
      for (int i = 1; i <= NOfClients ; i++)
         if (IsClientInGame(i) && !IsFakeClient(i))
         {
            ccount++;
         }
      if( ccount > GetConVarFloat(PlayersC) || status)
        return Plugin_Handled;
        KillTimer(g_hTimer);
      g_hTimer = null;
      g_hTimer = CreateTimer(GetConVarFloat(map_idle_time)*60, sprawdz2);
      return Plugin_Handled;
}

public Action sprawdz2(Handle Timer)
{
      char str[128];
      char mapname[128];
      char command_s[64];
      int ccount;
      int NOfClients = GetClientCount(true);
      g_hTimer = null;
      for (int i = 1; i <= NOfClients; i++)
         if (IsClientInGame(i) && !IsFakeClient(i))
         {
            ccount++;
         }
     
      if( ccount > GetConVarFloat(PlayersC) )
      {
          g_hTimer = CreateTimer(60.0, sprawdz ,_, TIMER_REPEAT|TIMER_FLAG_NO_MAPCHANGE);
          return Plugin_Handled;
      }
      else
      {
          GetCurrentMap(mapname,sizeof(mapname));
          GetConVarString(new_map, str, sizeof(str));
          if( strcmp(mapname, str, false) )
          {
            if( IsMapValid(str) ) ServerCommand("changelevel %s",str);
            return Plugin_Handled;
          }
          else if(GetConVarFloat(Timelimit_H))
          {
            GetConVarString(Command_S,command_s,sizeof(command_s));
            ServerCommand("%s %s",command_s,str);
            status = 1;
          }
      }
      return Plugin_Handled;
}
сейчас попробую, его компилить надо и smx тоже кидать да?Сори за тупой вопрос
 

Rutamaqyg

Участник
Сообщения
142
Реакции
2
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(33) : error 147: new-style declarations are required
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(35) : error 017: undefined symbol "timer"
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(39) : error 147: new-style declarations are required
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(41) : error 147: new-style declarations are required
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(42) : error 147: new-style declarations are required
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(43) : error 147: new-style declarations are required
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(51) : error 017: undefined symbol "timer"
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(52) : error 017: undefined symbol "timer"
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(52) : warning 215: expression has no effect
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(53) : error 017: undefined symbol "timer"
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(57) : error 147: new-style declarations are required
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(59) : error 147: new-style declarations are required
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(60) : error 147: new-style declarations are required
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(61) : error 147: new-style declarations are required
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(62) : error 147: new-style declarations are required
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(63) : error 147: new-style declarations are required
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(64) : error 017: undefined symbol "timer"
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(65) : error 147: new-style declarations are required
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(73) : error 017: undefined symbol "timer"
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(73) : warning 215: expression has no effect
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(74) : error 017: undefined symbol "timer"
/home/groups/sourcemod/upload_tmp/php3qkSp8.sp(5) : warning 203: symbol is never used: "g_hTimer"


Попробовал скомпилировать)
 

Rostu

Добрая душа
Сообщения
986
Реакции
623
@Rutamaqyg, Не знаю. У меня без проблем все :)
Вот скомпилированный
 

Вложения

  • b_test.smx
    5.5 КБ · Просмотры: 1
Сверху Снизу