SRL Archive - News and General

SRL Members, Number of Lines?


Tails111

2007-08-21 21:36:01

Well, in my script, a wood cutter and seller, is 550 lines enough to become an SRL member?

I know that there may not be a specific number of lines but I am just wondering what is the avarage number of lines that gets acepted into SRL Members, because if it isn't enough then I will have to think of a BOAT load of new stuff to add in. Although I think the script is just about complete. And has run 1:36:20 with just 1 person, so I think it would work. And that 1:36:20 was at 436 lines.

Any ideas as to how to help me make this a better script, with out looking at it?

And Does anyone know instead of using Until(False) at the end of the script, what would be a (Until NoPlayers) or something like that so if there aren't anymore usable players in the Declare Players place the script will end.

itSchRis917

2007-08-21 21:44:22



program New;
{.include SRL\SRL.scar}
function AllPlayersInactive: Boolean; //by TOB
var
InactivePlayers: Integer;
begin
InactivePlayers:= HowManyPlayersInactive;
if(InactivePlayers = HowManyPlayers) then
begin
WriteLn(TheTime + ' All players are inactive.');
Result:= True;
end;
end;

begin
Repeat
//blah blah
Until(AllPlayersInactive);
end.

^ Haven't personally tested that, but it SHOULD work..

Tails111

2007-08-21 21:48:31

Unknown identifier, HowManyPlayersInactive

itSchRis917

2007-08-21 22:05:32

whoops, you might need this function too.. ;)


{*****************************************************************************
function HowManyPlayersInactive: Integer;
By: TOB
Description: Counts how many players in the Players array are set to inactive
*****************************************************************************}
function HowManyPlayersInactive: Integer;
var
Player: Integer;
begin
for Player:= 0 to HowManyPlayers - 1 do
begin
if(Players[Player].Active = False) then
Result:= Result + 1;
end;
end;

Dan Cardin

2007-08-21 22:37:07

theres no average number of lines either.u could have 3000 lines of crap code, and not get in, then have 250 lines of amazing code and get in.

rotflmfwao

2007-08-22 12:07:24

aw darn. I didn't know there was an AllPlayersInactive func! I made my own lol
Function AllPlayersInactive:Boolean;
Var i,q:Integer;
Begin
LoginCheck;
Result:=False;
q:=0
For i:=0 to HowManyPlayers-1 do
Begin
If(Players[i].Active=False)Then
Inc(q);
End;
If(q=HowManyPlayers)Then
Result:=True;
End;

Oh, btw, since we're on the subject of people getting into members, could a few people look at my banana quester to see if it's good enough for a members app? If not, I'd add autocoloring, would that help my chances?

Tails111

2007-08-22 18:15:31

Yes, Add AUTOCOLORING!! From what I read, apparently they love autocoloring…

And Rotflm, I think I will give a shot at my own code.

RAM

2007-08-22 19:19:26

A good script is not based on size alone, but as a member, you should be familiar with… DTMs and/or Bit Maps, Walking, Fail safes, and multi-player support.


My suggestion to you would be…Post your script in the free section and let people test it out for you….that way, you can fine tune it and your talents will evolve as your script does….then, when you feel you are confident enough in your abilities to apply for membership, you will have good credentials to bring to the table…

There are a few good tutorials out there on becoming a member, feel free to search them out.

Good Luck,

~RAM

R0b0t1

2007-08-22 19:42:42

I didn't test my scripts RAM, and they though they were good.


Well… DDTMs are a definate plus, so is autocoloring, failsafes, no endless loops, and walking.

RAM

2007-08-22 19:48:00

From: r0b0t1
I didn't test my scripts RAM, and they though they were good.




You also made 2 different applications and it wasn't a unanimous vote;)

Tails111

2007-08-22 20:33:41

Ok, thanks guys I will definatly post it tomorrow (just tweaking the anti-ban =));

Anyways, Ram Congrats on the 7 months 5 days 20 hours and 43 minutes or autoing ….

TOB

2007-08-22 20:58:26

Heh, I like this thread :) I didn't know how many people actually used them.

And here I'll post them also anyway, these ones are modified a bit to trim the unnecessary stuff.

{*****************************************************************************
function HowManyPlayersInactive: Integer;
By: TOB
Description: Counts how many players in the Players array are set to inactive
*****************************************************************************}
function HowManyPlayersInactive: Integer;
var Player, NumberOfInactivePlayers: Integer;
begin
for Player:= 0 to HowManyPlayers - 1 do
if(Players[Player].Active = False) then NumberOfInactivePlayers:= NumberOfInactivePlayers + 1;
Result:= NumberOfInactivePlayers;
end;

{*****************************************************************************
procedure AllPlayersInactive;
By: TOB
Description: Checks to see if all players are set to inactive
*****************************************************************************}
function AllPlayersInactive: Boolean;
begin
if(HowManyPlayersInactive = HowManyPlayers) then
begin
WriteLn(TheTime + ' All players are inactive');
Result:= True; //You could change this to TerminateScript; if you really wanted to
end;
end;

Tails111

2007-08-22 21:21:52

Thanks TOB, I heavily changed them, but are based on the same thing, I have given you credits.

TOB

2007-08-22 21:29:28

No problem. :) I'm just glad people use them.

Tails111

2007-08-22 21:50:23

I would be glad to if people used some of my functions and procedures.