Author Topic: SOLVED-Server crash error!  (Read 1282 times)

0 Members and 1 Guest are viewing this topic.

Offline ghg

  • Camper
  • ***
  • Posts: 411
  • Village Idiot
SOLVED-Server crash error!
« on: July 18, 2007, 09:13:29 am »
Hi, I was transfering over to the newer server version (dedicated) and was adding to my scripts, I went to launch them when I got this error:



I think I'm using the default code:
Quote
procedure OnAdminConnect(IP: string);
begin
end;

procedure OnAdminDisconnect(IP: string);
begin
end;

procedure OnAdminMessage(IP, Msg: string);
begin
end;

If anyone can help, I'd be very, very grateful.

Info:

Newest dedicated server version.
Windows XP home edition.
Service Pack 2 (I'm sure this is a script problem, but I'll put it down anyway)
Uses some custom scripts to add spendable points from kills.
« Last Edit: July 18, 2007, 09:58:05 am by ghg »
-=Gradius wuz you=-

Offline Red_Dawn

  • Major
  • *
  • Posts: 63
  • C'mon! We're all going to die, die standing up!
Re: Server crash error!
« Reply #1 on: July 18, 2007, 09:15:01 am »
"caution still in beta phase" might explain something otherwise im not sure.

Offline EnEsCe

  • Retired Soldat Developer
  • Flamebow Warrior
  • ******
  • Posts: 3101
  • http://enesce.com/
    • [eC] Official Website
Re: Server crash error!
« Reply #2 on: July 18, 2007, 09:15:48 am »
The error isn't in the code you pasted, paste all your script files

Offline ghg

  • Camper
  • ***
  • Posts: 411
  • Village Idiot
Re: Server crash error!
« Reply #3 on: July 18, 2007, 09:27:23 am »
I can't be bothered to upload so:
NetworkCore.pas:
Quote
var
spawn_stat: array[1..16] of byte;
//Variable array for player spawned stationary guns
mana: array[1..16] of byte;
//Variable array for player mana level

function OnRequestGame(IP: string; State: integer): integer;
begin
  Result := State;
end;

procedure OnWeaponChange(ID, PrimaryNum, SecondaryNum: byte);
begin
end;

procedure OnJoinGame(ID, Team: byte);
begin
 if(IDToName(ID)='Major') then begin
  Command('/say Hasta la Vista Major!');
  Command('/kicklast');
  //Autokick Majors
 end;
 if(IDToName(ID)='Cpl. Gradius') then begin
  Command('/admip '+IntToStr(ID));
  //If I join we want to make me an admin obviously
  end;
end;

procedure OnJoinTeam(ID, Team: byte);
begin
 mana[ID] := 0;
 //When someone joins, reset their mana to zero
end;

procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);
begin
 mana[ID] := 0;
 //Honestly it's not needed to to the reset on the join team command, but what the hell
end;

procedure OnFlagGrab(ID, TeamFlag: byte; GrabbedInBase: boolean);
begin
end;

procedure OnFlagReturn(ID, TeamFlag: byte);
begin
end;

procedure OnFlagScore(ID, TeamFlag: byte);
begin
end;

procedure OnMapChange(NewMap: string);
begin
end;

procedure OnPlayerKill(Killer, Victim: byte; Weapon: string);
begin
 mana[killer] := mana[killer] + 1;
end;

function OnPlayerDamage(Victim, Shooter: byte; Damage: integer): integer;
begin
  // Victim = Player Damaged // Shooter = Player doing the damage
  result := Damage;
end;

procedure OnPlayerRespawn(ID: byte);
begin
end;

procedure OnPlayerSpeak(ID: byte; Text: string);
begin
 if(Text='/help mana') then begin
  SayToPlayer(ID,'You gain 1 Mana point per kill etc.');
  SayToPlayer(ID,'Mana is used for casting spells!');
 end;

 if(Text='/help heal') then begin
  SayToPlayer(ID,'"/heal" (5 Mana to use)');
  SayToPlayer(ID,'"Heal you completely!');
 end;
 
 if(Text='/help spawn stat') then begin
  SayToPlayer(ID,'"/spawn stat" (10 Mana to use)');
  SayToPlayer(ID,'Spawn a stat-gun by you for a few seconds!');
 end;

 if(Text='/help spawn flamer') then begin
  SayToPlayer(ID,'"/spawn flamer" (10 Mana to use)');
  SayToPlayer(ID,'Spawn a Flamer-Guard next to you!');
 end;

 if((Text='/heal')and(mana[ID] >= 5)) then begin
  DoDamage(ID,-200);
  mana[ID] := mana[ID] - 5;
 end;
 if((Text='/heal')and(mana[ID] < 5)) then begin
 SayToPlayer(ID,'Not enough Mana! 'string(mana[ID])+'/5!');
 end;

 if((Text='/spawn stat')and(mana[ID] >= 10)) then begin
  spawn_stat [ID]:= SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),15);
  mana[ID] := mana[ID] - 10;
  SayToPlayer(ID,'You spawned a stat gun!');
  sleep(1000);
  KillObject(spawn_stat[ID]);
  SayToPlayer(ID,'Your stat gun disintergrated!');
 end;
 if((Text='/spawn stat')and(mana[ID] < 10)) then begin
 SayToPlayer(ID,'Not enough Mana! 'string(mana[ID])+'/10!');
 end;

 if((Text='/spawn flamer')and(mana[ID] >= 10)) then begin
  SpawnObject(GetPlayerStat(ID,'x'),GetPlayerStat(ID,'y'),18);
  mana[ID] := mana[ID] - 10;
  SayToPlayer(ID,'You spawned a Flamer Guard!');
 end;
 if((Text='/spawn flamer')and(mana[ID] < 10)) then begin
 SayToPlayer(ID,'Not enough Mana! 'string(mana[ID])+'/10!');
 end;

end;


Core.pas:
Quote
{$VERSION 2.6.0}
const
//Teams
  ALPHA = 1;
  BRAVO = 2;
  CHARLIE = 3;
  DELTA = 4;
  SPECTATOR = 5;
//Game Modes
  DEATHMATCH = 0;
  POINTMATCH = 1;
  TEAMMATCH = 2;
  CTF = 3;
  RAMBO = 4;
  INF = 5;
  HTF = 6;
//Weapons
  DEAGLES = 1;
  HKMP5 = 2;
  AK74 = 3;
  STEYR = 4;
  SPAS = 5;
  RUGER = 6;
  M79 = 7;
  BARRET = 8;
  MINIMI = 9;
  MINIGUN = 10;
  FLAMER = 11;
  BOW = 12;
  FLAMEBOW = 13;
  SOCOM = 0;
  KNIFE = 14;
  CHAINSAW = 15;
  LAW = 16;

procedure ActivateServer();
begin
end;

procedure AppOnIdle(Ticks: integer);
begin
end;

function OnCommand(ID: Byte; Text: string): boolean;
begin
  //NOTE: This function will be called when an admin types a / command.
  Result := false; // Return true if you want to ignore the command typed.
end;

function OnPlayerCommand(ID: Byte; Text: string): boolean;
begin
  //NOTE: This function will be called when [_ANY_] player types a / command.
  Result := false; //Return true if you want disable the command typed.
end;

procedure OnException(ErrorMessage: string);
begin
 WriteFile('ErrorLog.txt',ErrorMessage);
 // Dump the error to text file.
end;

SocketCore.pas (didn't change anything):
Removed. Wasn't changed. Isn't compiled anyway (according to the include file).
« Last Edit: July 18, 2007, 09:31:54 am by ghg »
-=Gradius wuz you=-

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: Server crash error!
« Reply #4 on: July 18, 2007, 09:38:05 am »
 if((Text='/heal')and(mana[ID] < 5)) then begin
 SayToPlayer(ID,'Not enough Mana! 'string(mana[ID])+'/5!');
 end;

 if((Text='/heal')and(mana[ID] < 5)) then begin
 SayToPlayer(ID,'Not enough Mana! '+string(mana[ID])+'/5!');
 end;
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline ghg

  • Camper
  • ***
  • Posts: 411
  • Village Idiot
Re: Server crash error!
« Reply #5 on: July 18, 2007, 09:45:36 am »
Crap. Thought I added the plus. Also if how does one us an "or" command in soldat scripting? "if((blarg=1) or (blarg=2)) then begin"?

Date Posted: July 18, 2007, 10:44:15 AM
Type mismatch? Gah.
-=Gradius wuz you=-

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: Server crash error!
« Reply #6 on: July 18, 2007, 09:49:53 am »
which line number?
« Last Edit: July 18, 2007, 09:51:53 am by xmRipper »
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline ghg

  • Camper
  • ***
  • Posts: 411
  • Village Idiot
Re: Server crash error!
« Reply #7 on: July 18, 2007, 09:51:10 am »
(162:52)
-=Gradius wuz you=-

Offline xmRipper

  • Soldat Beta Team
  • Flagrunner
  • ******
  • Posts: 742
    • Personal
Re: Server crash error!
« Reply #8 on: July 18, 2007, 09:54:24 am »
 if((Text='/heal')and(mana[ID] < 5)) then begin
 SayToPlayer(ID,'Not enough Mana! '+IntToStr(mana[ID])+'/5!');
 end;

Try this.
Co-Founder / CTO @ Macellan
Founder Turkish Soldat Community

Offline ghg

  • Camper
  • ***
  • Posts: 411
  • Village Idiot
Re: Server crash error!
« Reply #9 on: July 18, 2007, 09:57:45 am »
Stupid. I was using a command for an different programming language, written in delphi too but different.
-=Gradius wuz you=-