Author Topic: What is wrong ?  (Read 3710 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
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;