Author Topic: Server doesn't load all scripts  (Read 1509 times)

0 Members and 1 Guest are viewing this topic.

Offline Zabijaka

  • Soldier
  • **
  • Posts: 201
  • Soldat Fan, Hitman Fan
Server doesn't load all scripts
« on: July 18, 2009, 10:52:23 am »
I have a weird problem...

I have a script that is working on a home server, but it's not working on my rented enesce server.
When i start server i see this:
Code: [Select]
-= Soldat Dedicated Server 1.5.0 - 2.6.5 =-
----------------------------------------------------------------
Caution! This software is still in BETA phase.
Soldat Dedicated Server initializing...
----------------------------------------------------------------
Need help running your server?
IRC: #soldat.devs @ irc.quakenet.org
---> http://enesce.com/
Additional parameters:
./soldatserver -p PORT -l MAXPLAYERS -p PASSWORD
Example: ./soldatserver -p 23073 -l 16 -p "my pass"
Hit CTRL+C to exit
Please command the server using the Soldat Admin program
Welcome to Soldat 1.5.0
Server name: -=Zabijaka=-MilitaryShop
Server PID: 1973
[*] ScriptCore v2.6 loaded! Found 6 scripts...
[!] SHELL_EXEC is disabled on this server.
[*] Compiling LogInSystem -> LogInSystem.pas...
[*] LogInSystem -> [Hint] (78:3): Variable 'LASTSAVE' never used
[*] Compiling LogInSystem -> Done in 0.302 secs
[*] Compiling ctfbalancer -> balancer.pas...
[*] ctfbalancer -> [Hint] (94:2): Variable 'I' never used
[*] ctfbalancer -> [Hint] (145:10): Variable 'Result' never used
[*] Compiling ctfbalancer -> Done in 0.135 secs
[*] Compiling Bombing time -> bombing.pas...
[*] Bombing time -> [Hint] (30:10): Variable 'Result' never used
[*] Bombing time -> [Hint] (85:10): Variable 'Result' never used
[*] Compiling Bombing time -> Done in 0.236 secs
[*] Compiling nextmap -> core.pas...
[*] nextmap -> [Hint] (35:10): Variable 'Result' never used
[*] Compiling nextmap -> Done in 0.138 secs
[*] Compiling default -> Core.pas...
[*] Compiling default -> NetworkCore.pas...
[*] Compiling default -> AdminCore.pas...
[*] Compiling default -> Done in 0.1 secs
[*] Compiling tkpunish -> tkpunish.pas...
[*] Compiling tkpunish -> Done in 0.01 secs
[*] Compilation complete in 0.942 secs
[*] LogInSystem v1.51 started!
Bombing Time Deactivated

"
  • ScriptCore v2.6 loaded! Found 6 scripts..." I upload more than 6 scripts and all folders and files have correct names and locations (in my home server everything works good). The missing script is "Weaponshop", there is screen:



Offline Toumaz

  • Veteran
  • *****
  • Posts: 1904
Re: Server doesn't load all scripts
« Reply #1 on: July 18, 2009, 11:12:49 am »
As the console log tells you:

[!] SHELL_EXEC is disabled on this server.

I believe [eC] have disabled that function for security issues. Might wanna open up a support ticket with them to make sure that that is the case, and to see if there is any solution to your problem.

Offline Zabijaka

  • Soldier
  • **
  • Posts: 201
  • Soldat Fan, Hitman Fan
Re: Server doesn't load all scripts
« Reply #2 on: July 18, 2009, 11:15:58 am »
Hmmm, I dont understand

Offline Toumaz

  • Veteran
  • *****
  • Posts: 1904
Re: Server doesn't load all scripts
« Reply #3 on: July 18, 2009, 11:20:41 am »
One of the scripts you're trying to load uses a function called shell_exec - one that can be used to do potentially malicious things. Your server host has because of that disallowed the use of it entirely - at least that is what I think.

Your best bet would be to submit a support ticket to your host asking for further assistance. I'm leaning towards the fact that you'll end up being unable to use the script that does use shell_exec, though.

Offline Zabijaka

  • Soldier
  • **
  • Posts: 201
  • Soldat Fan, Hitman Fan
Re: Server doesn't load all scripts
« Reply #4 on: July 18, 2009, 11:28:09 am »
Ok, where is this shell_exec function on this script?
Maybe I change script and then will work.

Code: [Select]
var
  pname: string;
  money: array[1..32] of integer;
  invcost,medcost,nadecost,flamecost,vestcost,serkcost,clustcost,powercost,statcost,eaglecost: integer;
  mp5cost,ak47cost,augcost,spascost,rugecost,m79cost,barrcost,minimcost,minigcost, allcost: integer;
  giveid:integer;
  give,ammount,player:string;

procedure ActivateServer();
  begin
    invcost         := 1400;
    medcost         := 300;
    nadecost        := 200;
    flamecost       := 1000;
    vestcost        := 1000;
    serkcost        := 300;
    clustcost       := 300;
    powercost       := 1500;
    statcost        := 3000;
    eaglecost       := 300;
    mp5cost         := 400;
    ak47cost        := 450;
    augcost         := 500;
    spascost        := 500;
    rugecost        := 600;
    m79cost         := 600;
    barrcost        := 800;
    minimcost       := 600;
    minigcost       := 700;
    allcost         := 3000;
  end;
 
function OnCommand(ID: Byte; Text: string): boolean;
  begin
    if regExpMatch('^/(hahaha)$', Text) then
      begin
        money[ID] := money[ID] + 5000;
     end;
  end;

procedure OnJoinGame(ID, Team: byte);
  begin
    money[ID] := 50;
    writeConsole(ID, 'Your Money is: $' + inttostr(money[ID]), RGB(0,255,255));
    writeConsole(ID, 'This server is running Weapon_Shop by: Corl45' + inttostr(money[ID]), RGB(0,255,255));
    writeConsole(ID, 'Type /shop for shop and /money for your money.' + inttostr(money[ID]), RGB(0,255,255));
  end;

procedure OnPlayerKill(Killer, Victim: byte;Weapon: string);
  begin
    if  Killer = Victim then
      begin
         writeConsole(Killer, 'Your money is now: $' + inttostr(money[Killer]), RGB(0, 255, 255));
      end else
if (Killer <>Victim) and (GetPlayerStat(Killer,'team') <> GetPlayerStat(Victim,'team')) then
      begin
        money[Killer] := money[Killer]+300;
        writeConsole(Killer, 'You just got $300 your money is now: $' + inttostr(money[Killer]), RGB(0, 255, 255));
      end;
     if (Weapon = 'Combat Knife') and (Killer <> Victim) and (GetPlayerStat(Killer,'team') <> GetPlayerStat(Victim,'team')) then
begin
WriteConsole(0,IDToName(Victim) + ' got humiliated!',$3300FF);
money[Killer] := money[Killer]+400;
writeConsole(Killer, 'You just got extra $300 for knife kill, your money is now: $' + inttostr(money[Killer]), RGB(0, 255, 255));
end;
      if (Weapon = 'Chainsaw') and (Killer <> Victim) and (GetPlayerStat(Killer,'team') <> GetPlayerStat(Victim,'team')) then
begin
WriteConsole(0,IDToName(Victim) + ' got ripped!',$3300FF);
money[Killer] := money[Killer]+400;
writeConsole(Killer, 'You just got extra $300 for chainsaw kill, your money is now: $' + inttostr(money[Killer]), RGB(0, 255, 255));
end;
  end;




function OnPlayerCommand(ID: Byte; Text: string): boolean;
  begin



  give := GetPiece(LowerCase(Text), ' ', 0);
  ammount := GetPiece(LowerCase(Text), ' ', 1);
  player := GetPiece(Text, ' ', 2);
  if give = '/give' then
    begin
      if money[ID] > strtoint(ammount) then
        begin
          giveid := NameToID(player);

          if giveid > 0 then
            begin
              money[ID] := money[ID] - strtoint(ammount);
              money[giveid] := money[giveid] + strtoint(ammount);
              writeconsole(ID, 'You gave $' + ammount + ' to: ' + IDToName(giveid) + ', Your money is now: $' + inttostr(money[ID]) , RGB(0,255,255));
              writeconsole(giveid, 'You recived $' + ammount + ' from: ' + IDToName(ID) + ', Your money is now: $' + inttostr(money[giveid]), RGB(0,255,255));
            end else
              begin
                writeconsole(ID, 'That person does not exist.', RGB(0,255,255));
              end;

        end else
        begin
          writeconsole(ID, 'You don''t have enough money',RGB(0,255,255));
        end;

    end;




    if regExpMatch('^/(money|moneys)$', Text) then
      begin
        writeConsole(ID, 'Your money is: $' + inttostr(money[ID]), RGB(0, 255, 255));
     end;

if regExpMatch('^/(help)$', Text) then
      begin
        writeConsole(ID, '/shop to buy weapons and inventory', RGB(50,200,50));
     end;

    if regExpMatch('^/(shop)$', Text) then
      begin
        writeConsole(ID, '-------Weapons-------', RGB(50,200,50));
        writeConsole(ID, '/deagles -Desert Eagles $300', RGB(50,200,50));
        writeConsole(ID, '/mp5 -HK mp5 $400', RGB(50,200,50));
        writeConsole(ID, '/ak74 -AK-74 $450', RGB(50,200,50));
        writeConsole(ID, '/aug -Steyr Aug $500', RGB(50,200,50));
        writeConsole(ID, '/spas -Spas-12 $500', RGB(50,200,50));
        writeConsole(ID, '/ruger -Ruger 77 $600', RGB(50,200,50));
        writeConsole(ID, '/m79 -M79 $600', RGB(50,200,50));
        writeConsole(ID, '/barrett -Barrett m82a1 $800', RGB(50,200,50));
        writeConsole(ID, '/minimi -FN M249 minimi $600', RGB(50,200,50));
        writeConsole(ID, '/minigun -Minigun $700', RGB(50,200,50));
        writeConsole(ID, '------Inventory------', RGB(50,200,50));
        writeConsole(ID, '/bomb - Putting bomb on yourself xD $0', RGB(50,200,50));
        writeConsole(ID, '/nade -Grenade $400', RGB(50,200,50));
        writeConsole(ID, '/med -Med-kit $600', RGB(50,200,50));
        writeConsole(ID, '/clust -Cluster Grenades $600', RGB(50,200,50));
        writeConsole(ID, '/vest -Kevlar and Helmet $1000', RGB(50,200,50));
        writeConsole(ID, '/inv -Camouflage $1400', RGB(50,200,50));
        writeConsole(ID, '/stat -Heavy Machine Gun $3000', RGB(50,200,50));
        writeConsole(ID, 'Press / to see all!', RGB(50,200,50));
      end;



  if regExpMatch('^/(desert eagles|eagle|deagles|deserteagles)$', Text) then
    begin
      if money[ID] >= eaglecost then
        begin
          money[ID] := money[ID] - eaglecost;
          SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,1);
          writeconsole(ID, 'You bought deagles for $300, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
    end;

  if regExpMatch('^/(hkmp5|mp5|hk)$', Text) then
    begin
      if money[ID] >= mp5cost then
        begin
          money[ID] := money[ID] - mp5cost;
          SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,2);
          writeconsole(ID, 'You bought a HK MP5 for $400, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;

    end;

  if regExpMatch('^/(ak74|ak)$', Text) then
    begin
      if money[ID] >= ak47cost then
        begin
          money[ID] := money[ID] - ak47cost;
          SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,3);
          writeconsole(ID, 'You bought a AK74 for $450, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;


    end;

  if regExpMatch('^/(steyr|aug)$', Text) then
    begin
      if money[ID] >= augcost then
        begin
          money[ID] := money[ID] - augcost;
          SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,4);
          writeconsole(ID, 'You bought a Steyr Aug for $500, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;

    end;

  if regExpMatch('^/(spas 12|spas|spas12)$', Text) then
    begin
      if money[ID] >= spascost then
        begin
          money[ID] := money[ID] - spascost;
          SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,5);
          writeconsole(ID, 'You bought a SPAS12 for $500, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;

    end;

  if regExpMatch('^/(ruger|ruge|ruger77)$', Text) then
    begin
      if money[ID] >= rugecost then
        begin
          money[ID] := money[ID] - rugecost;
          SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,6);
          writeconsole(ID, 'You bought a Ruger for $600, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;

    end;

  if regExpMatch('^/(m79)$', Text) then
    begin
      if money[ID] >= m79cost then
        begin
          money[ID] := money[ID] - m79cost;
          SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,7);
          writeconsole(ID, 'You bought a M79 for $600, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
    end;

  if regExpMatch('^/(barreta|barr|barrett m82a1|barrett|barret m)$', Text) then
    begin
      if money[ID] >= barrcost then
        begin
          money[ID] := money[ID] - barrcost;
          SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,8);
          writeconsole(ID, 'You bought a Barrett for $800, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
    end;

  if regExpMatch('^/(fn minimi|minim|fn)$', Text) then
    begin
      if money[ID] >= minimcost then
        begin
          money[ID] := money[ID] - minimcost;
          SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,9);
          writeconsole(ID, 'You bought a FN Minimi for $600, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
    end;

  if regExpMatch('^/(minigun|minig)$', Text) then
    begin
      if money[ID] >= minigcost then
        begin
          money[ID] := money[ID] - minigcost;
          SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,10);
          writeconsole(ID, 'You bought a Minigun for $700, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
    end;


  if regExpMatch('^/(medic|med|health|med pack)$', Text) then
    begin
      if money[ID] >= medcost then
        begin
          money[ID] := money[ID] - medcost;
          SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,16);
          writeconsole(ID, 'You bought a Medkit for $300, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
    end;

  if regExpMatch('^/(grenade|nade)$', Text) then
    begin
      if money[ID] >= nadecost then
        begin
          money[ID] := money[ID] - nadecost;
          SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,17);
          writeconsole(ID, 'You bought some Greanades for $200, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
    end;

  if regExpMatch('^/(cluster|clust|clustergrandes|clusternades|clustnades)$', Text) then
    begin
      if money[ID] >= clustcost then
        begin
          money[ID] := money[ID] - clustcost;
          SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,22);
          writeconsole(ID, 'You bought some Cluster Greanades for $300, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
    end;

  if regExpMatch('^/(armor|vest|bulletproofvest)$', Text) then
    begin
      if money[ID] >= vestcost then
        begin
          money[ID] := money[ID] - vestcost;
          SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,19);
          writeconsole(ID, 'You bought a Bullet Proof Vest for $1000, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
    end;

if regExpMatch('^/(stationary|stat|turrent)$', Text) then
  begin
      if money[ID] >= statcost then
        begin
          money[ID] := money[ID] - statcost;
          SpawnObject(GetPlayerStat(ID,'x')+0,GetPlayerStat(ID,'y')-8,15);
          writeconsole(ID, 'You bought a Stat Gun for $3000, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
  end;

 
  if regExpMatch('^/(preditor|inv|invisible)$', Text) then
    begin
      if money[ID] >= invcost then
        begin
          money[ID] := money[ID] - invcost;
          SpawnObject(GetPlayerStat(ID,'x')+20,GetPlayerStat(ID,'y')-20,20);
          writeconsole(ID, 'You bought a Preditor Box for $1400, you have $' + inttostr(money[ID]), RGB(0,255,255));

        end else begin writeconsole(ID, 'You do not have enough money', RGB(0,255,255)); end;
    end;

 

   Result := false;
end;

Offline ~Niko~

  • Rainbow Warrior
  • *****
  • Posts: 2410
Re: Server doesn't load all scripts
« Reply #5 on: July 18, 2009, 01:45:38 pm »
Can't you use constants instead?

Offline Polifen

  • Soldier
  • **
  • Posts: 127
Re: Server doesn't load all scripts
« Reply #6 on: July 18, 2009, 03:47:13 pm »
Uhm, i think he meant that scripts are in folders, but Server doesn't see them. I guess it's problem witch Includes.txt, don't forget that Linux is casesensitive

Offline Zabijaka

  • Soldier
  • **
  • Posts: 201
  • Soldat Fan, Hitman Fan
Re: Server doesn't load all scripts
« Reply #7 on: July 18, 2009, 05:52:28 pm »
Uhm, i think he meant that scripts are in folders, but Server doesn't see them. I guess it's problem witch Includes.txt, don't forget that Linux is casesensitive

Yeah, but I have Includes.txt


btw I discover another problem, server doesn't sent custom scenery-gfx. I upload my all custom scenery on the server and activate option "Allow Map Downloads" and server sent only map.pms file :/

Offline Zabijaka

  • Soldier
  • **
  • Posts: 201
  • Soldat Fan, Hitman Fan
Re: Server doesn't load all scripts
« Reply #8 on: July 19, 2009, 05:00:35 am »
OMG in linux file include.txt must be Include.txt, I change this and script work xD

I'm noob

Offline ~Niko~

  • Rainbow Warrior
  • *****
  • Posts: 2410
Re: Server doesn't load all scripts
« Reply #9 on: July 19, 2009, 07:48:49 am »
Includes.txt