jeudi 14 juillet 2016

Unknown command or variable - RCON trouble

This entry passed through the Full-Text RSS service - if this is your content and you're reading it on someone else's site, please read the FAQ at http://ift.tt/jcXqJW.
Recommended article from FiveFilters.org: Most Labour MPs in the UK Are Revolting.



Unknown command or variable - RCON trouble

Little Clucker

 
Daveosss's Avatar
 

Join Date: Nov 2014

Posts: 14

Reputation: 0

DefaultUnknown command or variable - RCON trouble

Hello,
for past few days, we have been working (me and my friends) on an ability for players to connect server account with web account. Even though everything works smooth, there´s one small problem, that appears after few hours server is up. Server just stops sending playerdata and sometimes all server timers stop working. There also shows up an error in serverlog "Unknown command or variable: vypisdat" (vypisdat is FS containing OnRconCommand callback, you can see the code below) This error also appears when typing /rcon login, then it´s "Unknown command or variable: login" I have never had this problem before, so it has to do with latest server update. You can see all the used code below. Thank you in advance for help, REP+++ for those who will.

Timer and callback which clicks the website every 30s to call rcon command "vypisdat" and work with FS "vypisdat"

PHP Code:

SetTimer("Vysilac"30000true); //Timer in OnGameModeInIt

//=======

forward Vysilac(playerid);
public 
Vysilac(playerid)
{
    
HTTP(playeridHTTP_HEAD"http://ift.tt/29MzfMa"""""); //this link calls rcon command "vypisdat" and works with FS "vypisdat"
    
return 1;


This is all the FS "vypisdat" contains, this FS prints data of all players to the server log, website later works with it

PHP Code:


public OnRconCommand(cmd[])
{
    if(
strcmp(cmd,"vypisdat",true,8) == 0)
    {
        for(new 
i=0;i<MAX_PLAYERSi++)
        {
              if(
IsPlayerConnected(i))
              {
                  if(
GetPVarInt(i"Prihlasen") == 1// If is player logged in
                  
{                 printf("%s=%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d|%d"pName(i) , GetPVarInt(i"Money"), GetPVarInt(i"Team"), GetPVarInt(i"Skin"), GetPVarInt(i"Hodin"), GetPVarInt(i"Minut"), GetPVarInt(i"Ustrice"), GetPVarInt(i"Balicky"), GetPVarInt(i"Zatcen"),
GetPVarInt(i"Zabil"), GetPVarInt(i"Umrel"), GetPVarInt(i"XP"), GetPVarInt(i,"Vykradeno"), GetPVarInt(i"Zavodu"), GetPVarInt(i"Marihuana"), GetPVarInt(i"Kokain"), GetPVarInt(i"Exported"), GetPVarInt(i"Eventu"), GetPVarInt(i"NaDostihach"), GetPVarInt(i"Ryby"), GetPVarInt(i"Bodce"), GetPVarInt(i"Stuntu"), GetPVarInt(i"Cigarety"), GetPVarInt(i"Vino"), GetPVarInt(i"Sprunk"));

                  }
            }
          }
        return 

1;
    }
    return 
0;
}
stock pName(playerid)
{
    new 
name[MAX_PLAYER_NAME];
    
GetPlayerName(playeridnameMAX_PLAYER_NAME);
    return 
name;

__________________

Aucun commentaire:

Enregistrer un commentaire