Author Topic: What is wrong ?  (Read 3723 times)

0 Members and 1 Guest are viewing this topic.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
What is wrong ?
« on: February 06, 2010, 01:48:56 pm »
if (NumPlayers=1) then
begin
    if (AlphaPlayers=1) then Command('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Slicer Zombie')
                                                  ('/addbot2 Burning Zombie')
                                                  ('/addbot2 Taliban')
                                                  end;
if (NumPlayers=2) then
begin
    if (AlphaPlayers=2) then Command('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Slicer Zombie')
                                                  ('/addbot2 Burning Zombie')
                                                  ('/addbot2 Taliban')
                                                  ('/addbot2 Serker Zombie')
                                                  end;

//////////////////////////////////////////////////////////////////////////////////
WHAT'S WRONG ??? ??? ??? ???
                                         
« Last Edit: February 06, 2010, 01:52:03 pm by mich1103 »

Offline Horve

  • Flagrunner
  • ****
  • Posts: 692
  • Vig
Re: What is wrong ?
« Reply #1 on: February 06, 2010, 02:01:20 pm »
NumPlayers = players and bots together
try (NumPlayers - NumBots) in stead of just NumPlayers

and I'm not sure, but doesn't command already do >> /  << at the beginning?
« Last Edit: February 06, 2010, 02:03:19 pm by Horve »

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: What is wrong ?
« Reply #2 on: February 06, 2010, 02:11:36 pm »
Uhh, you didnt specify the procedure.

Please, take a look at some other scripts to see how should the syntax should look.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: What is wrong ?
« Reply #3 on: February 06, 2010, 02:15:47 pm »
can you make my script work please ????

do i need to do that ? :

///////////////////////////////////////////////////////////////////
procedure ActivateServer();
begin
if (NumPlayers=1) then
begin
    if (AlphaPlayers=1) then Command('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Slicer Zombie')
                                                  ('/addbot2 Burning Zombie')
                                                  ('/addbot2 Taliban')
                                                  end;
if (NumPlayers=2) then
begin
    if (AlphaPlayers=2) then Command('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Slicer Zombie')
                                                  ('/addbot2 Burning Zombie')
                                                  ('/addbot2 Taliban')
                                                  ('/addbot2 Serker Zombie')
                                                  end;
/////////////////////////////////////////////////////////////////////////
« Last Edit: February 06, 2010, 02:28:06 pm by mich1103 »

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: What is wrong ?
« Reply #4 on: February 06, 2010, 02:43:49 pm »
READ THIS: http://enesce.com/help/
THE DESCRIPTIONS
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: What is wrong ?
« Reply #5 on: February 06, 2010, 02:53:52 pm »
why that's dont work :

procedure OnJoinGame(ID, Team: byte)
begin
if (NumPlayers=1) then
begin
    if (AlphaPlayers=1) then Command('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Slicer Zombie')
                                                  ('/addbot2 Burning Zombie')
                                                  ('/addbot2 Taliban')
                                                  end;
if (NumPlayers=2) then
begin
    if (AlphaPlayers=2) then Command('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Zombie')
                                                  ('/addbot2 Slicer Zombie')
                                                  ('/addbot2 Burning Zombie')
                                                  ('/addbot2 Taliban')
                                                  ('/addbot2 Serker Zombie')

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: What is wrong ?
« Reply #6 on: February 06, 2010, 03:00:36 pm »
Omfg, maybe because you do not read other peoples posts?
Go and learn scripting slowly, with little parts, like when a player types /lol it says "Swompie laughing out loud! LOL!".
Also use this button for codes.

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: What is wrong ?
« Reply #7 on: February 06, 2010, 03:04:46 pm »
DESCRIPTIONS FOR F**K SAKE

READ THEM

Just do it with
Code: [Select]
procedure OnJoinTeam(ID, Team: byte)
begin

if (AlphaPlayers=1) then
   begin
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Slicer Zombie');
Command('/addbot2 Burning Zombie');
Command('/addbot2 Taliban');
end;

if (AlphaPlayers=2) then
   begin
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Slicer Zombie');
Command('/addbot2 Burning Zombie');
Command('/addbot2 Taliban');
end;

end;

This is the last time i will edit your scripts, i swear to god with that.
« Last Edit: February 06, 2010, 03:08:43 pm by croat1gamer »
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: What is wrong ?
« Reply #8 on: February 06, 2010, 04:44:12 pm »
thanks man   ;D 
i will try to learn pascal




is not to be bad with you but the script you have post doesn't work too.

i put OnScriptCrash:1

and when i start my server with this script my server automaticly shutdown ...




« Last Edit: February 06, 2010, 05:03:26 pm by mich1103 »

Offline VinceBros

  • Soldat Beta Team
  • Camper
  • ******
  • Posts: 275
Re: What is wrong ?
« Reply #9 on: February 06, 2010, 05:25:13 pm »
Try this
Code: (pascal) [Select]
procedure OnJoinTeam(ID, Team: byte);
begin

if (AlphaPlayers=1) then
   begin
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Slicer Zombie');
Command('/addbot2 Burning Zombie');
Command('/addbot2 Taliban');
end;

if (AlphaPlayers=2) then
   begin
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Zombie');
Command('/addbot2 Slicer Zombie');
Command('/addbot2 Burning Zombie');
Command('/addbot2 Taliban');
end;

end;

He forgot a semicolon after OnJoinTeam.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: What is wrong ?
« Reply #10 on: February 06, 2010, 05:49:53 pm »
that's dont work too
my server shut down automatibly whne i start my server

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: What is wrong ?
« Reply #11 on: February 06, 2010, 06:33:11 pm »
i put OnScriptCrash:1
If you mean the OnScriptCrash from server.ini, it's values are "ignore", "shutdown" and "recompile" as far as I know.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: What is wrong ?
« Reply #12 on: February 06, 2010, 07:38:33 pm »
euuhhhh i dont understand


i just want to know why the script dont work .

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: What is wrong ?
« Reply #13 on: February 06, 2010, 07:53:06 pm »
He forgot a semicolon after OnJoinTeam.
My bad.

Use what vince wrote, make sure that THIS script is the problem cause.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: What is wrong ?
« Reply #14 on: February 06, 2010, 08:02:07 pm »
doesn't work too


i use the script of VinceBros
and that's dont work

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: What is wrong ?
« Reply #15 on: February 06, 2010, 08:17:20 pm »
Make sure that THIS script is the cause for the problem.

What do the logs say?
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: What is wrong ?
« Reply #16 on: February 06, 2010, 08:22:26 pm »
I found it :
 :o  :o  :o  :o  :o


10-02-06 20:20:02    Console Log Started
10-02-06 20:20:02 Loaded weapons mod "Default mod v1.5"
10-02-06 20:20:02 Welcome to Soldat 1.5.0
10-02-06 20:20:02 
  • ScriptCore v2.6 loaded! Found 17 scripts...

10-02-06 20:20:02 
  • Compiling Admin Invincibility -> Invin.pas...

10-02-06 20:20:02 
  • Compiling autobot -> ab.pas...

10-02-06 20:20:02 
  • autobot -> [Error] (2:1): 'BEGIN' expected

10-02-06 20:20:02 
  • Compiling blank -> LogInSystem.pas...

10-02-06 20:20:02 
  • Compiling commands -> commands.pas...

10-02-06 20:20:02 
  • Compiling CriticalHit -> ch.pas...

10-02-06 20:20:02 
  • Compiling default -> Core.pas...

10-02-06 20:20:02 
  • Compiling default -> NetworkCore.pas...

10-02-06 20:20:02 
  • Compiling default -> AdminCore.pas...

10-02-06 20:20:02 
  • Compiling Invisibility -> Invis.pas...

10-02-06 20:20:02 
  • Compiling log -> log.pas...

10-02-06 20:20:02 
  • Compiling Medic -> Medic.pas...

10-02-06 20:20:02 
  • Compiling MoveTeam -> MoveTeam.pas...

10-02-06 20:20:02 
  • Compiling Nextmap -> core.pas...

10-02-06 20:20:02 
  • Compiling slicerzombie -> sz.pas...

10-02-06 20:20:02 
  • Compiling SpecialBots -> SpecialBots.pas...

10-02-06 20:20:02 
  • Compiling sprees -> spree.pas...

10-02-06 20:20:02 
  • Compiling subadmin -> sub.pas...

10-02-06 20:20:02 
  • Compiling Taliban -> Taliban.pas...

10-02-06 20:20:02 
  • Compiling Weapon_shop -> Weapon_shop.pas...

10-02-06 20:20:02 
  • Compilation Failed.

10-02-06 20:20:02 Shutting down server...
10-02-06 20:20:02 Shutting down admin server...
10-02-06 20:20:02 Shutting down ScriptCore...


Compiling autobot -> ab.pas...
10-02-06 20:20:02 
autobot -> [Error] (2:1): 'BEGIN' expected
« Last Edit: February 06, 2010, 09:43:48 pm by mich1103 »

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: What is wrong ?
« Reply #17 on: February 06, 2010, 10:04:12 pm »
Your autobot script is doing the problem.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline Horve

  • Flagrunner
  • ****
  • Posts: 692
  • Vig
Re: What is wrong ?
« Reply #18 on: February 06, 2010, 11:43:51 pm »
in your autobot script, the error is in the very first line. The script wants you to include begin somewhere, as you don't have it typed.

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: What is wrong ?
« Reply #19 on: February 07, 2010, 05:51:10 am »
The problem is obviously like in his zombie adding script, as he cant write the syntax properly.
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: What is wrong ?
« Reply #20 on: February 07, 2010, 07:22:30 am »
whaaaaaaat   
the includes is the problem?



Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: What is wrong ?
« Reply #21 on: February 07, 2010, 07:23:42 am »
Compiling autobot -> ab.pas...
10-02-06 20:20:02
autobot -> [Error]

THIS SCRIPT IS THE PROBLEM
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: What is wrong ?
« Reply #22 on: February 07, 2010, 07:26:23 am »
i know but how i make this script working

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: What is wrong ?
« Reply #23 on: February 07, 2010, 07:33:57 am »
Learn how to write scripts properly?
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: What is wrong ?
« Reply #24 on: February 07, 2010, 07:39:06 am »
yesterday i verefy
procedureOnJoinTeam(ID, Team: byte); 
and that's right i verefy in your enesce manual...

you've say that was the last time i will edit script for you and the script was supposed to work or not ???

 
IT IS SO DIFFICULT to say what is wrong ???????
« Last Edit: February 07, 2010, 08:38:56 am by mich1103 »

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: What is wrong ?
« Reply #25 on: February 07, 2010, 09:30:11 am »
procedure OnJoinTeam(ID, Team: byte);

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: What is wrong ?
« Reply #26 on: February 07, 2010, 10:29:40 am »
OK if that is wrong :
procedure OnJoinTeam(ID, Team: byte);

what i need to put
??? ??? ??? ???

Offline dnmr

  • Camper
  • ***
  • Posts: 315
  • emotionally handicapped
Re: What is wrong ?
« Reply #27 on: February 07, 2010, 10:54:22 am »
you were missing a space

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: What is wrong ?
« Reply #28 on: February 07, 2010, 11:16:31 am »
i miss a space ?
where ?

From: February 07, 2010, 11:37:38 am
when a player join,my script add auto the bot but doesn't remove when he quit
do i need to use procedure OnLeaveGame(ID, Team: byte;Kicked: boolean);

then begin ...
then Command('/kick Zombie....

like that ??? or not ???
« Last Edit: February 07, 2010, 11:37:38 am by mich1103 »

Offline croat1gamer

  • Veteran
  • *****
  • Posts: 1327
  • OMG CHANGING AVATAR!!! ^ω^
Re: What is wrong ?
« Reply #29 on: February 07, 2010, 11:40:06 am »
I made it extra noticeable:
Last year, I dreamt I was pissing at a restroom, but I missed the urinal and my penis exploded.

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: What is wrong ?
« Reply #30 on: February 07, 2010, 11:59:39 am »
OnJoinTeam/OnLeaveGame is what is called when someone joins/leaves game. If you want to balance bots depending on player count you need to add them when someone joins and kick when he leaves. I bet you won't understand but it's good to try.

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: What is wrong ?
« Reply #31 on: February 07, 2010, 11:59:54 am »
omg i know
the script work correcly
but i want when the player leave that kick the bot who have been adding when he have join.


*****************
I dont talk to you Gizd
*****************
ok Gizd can you give me an example for when the player leave that kick the bot who have been added when he have join
« Last Edit: February 07, 2010, 12:05:54 pm by mich1103 »

Offline y0uRd34th

  • Camper
  • ***
  • Posts: 325
  • [i]Look Signature![/i]
Re: What is wrong ?
« Reply #32 on: February 07, 2010, 12:17:42 pm »
I am sorry, but LOOL!!!

mich1103, try to start with VERY simple scripts, instead of posting thousands of questions, when you try little things, and you have problems, then create a topic, name it like "I am learning scripting" and post all your questions in there, thx.

Here an example what i mean with "VERY simple":
Code: [Select]
function OnPlayerCommand(ID: byte; Text: string): boolean;
begin

  Result := false;

  if Text = '/lol' then
    WriteConsole(0, IDToName(ID) + ' is laughing out loud!! XD LOL?!?', $FFFF00);

end;

I hope you understand what i mean, try it step by step, always a bit harder..
« Last Edit: February 07, 2010, 12:20:41 pm by y0uRd34th »

Offline mich1103

  • Flagrunner
  • ****
  • Posts: 557
  • Did you say chocolate ? O.o
    • ZoMbIe-DeStRoYeR pk server
Re: What is wrong ?
« Reply #33 on: February 07, 2010, 12:32:45 pm »
i can do this simple script that's very easier
i do step by step and now im here to complete the script we have do.
Now the script work but i just want when the player leave the game that kick the zombie he have added whan i have join.

so i think i need to use that :

procedure OnLeaveGame(ID, Team: byte;Kicked: boolean);
begin
if (THERE IS THE PROBLEM,i want a leave... thing)

Offline Gizd

  • Flagrunner
  • ****
  • Posts: 586
  • (Re)tired
    • Eat-this! community site
Re: What is wrong ?
« Reply #34 on: February 08, 2010, 09:56:41 am »
Let me kill this thread once and for all...
Code: [Select]
const
  BotsPerPlayer = x; // bots added per player
  MaxPlayers2 = y; // max players on server

var
  Bot: array[1..MaxPlayers2] of array[1..BotsPerPlayer] of byte;
  i, j: byte;

procedure OnJoinGame(ID,Team: byte);
begin
  for i:= 1 to MaxPlayers2 do if Bot[i][1] = 0 then begin
    Bot[i][1]:= Command('/addbot2 Zombie');
    ...  // here go commands adding bots
    Bot[i][BotsPerPlayer]:= Command('/addbot2 Zombie');
    break;
  end;
end;

procedure OnLeaveGame(ID, Team: byte; Kicked: boolean);
begin
  for i:= 1 to MaxPlayers2 do if Bot[i][1] > 0 then begin
    for j:= 1 to BotsPerPlayer do begin
      KickPlayer(Bot[i][j]);
      Bot[i][j]:= 0;
    end;
    break;
  end;
end;