Gamestudio Links
Zorro Links
Newest Posts
Lapsa's very own thread
by Lapsa. 06/08/26 22:41
Stooq now requires an API key
by VHX. 06/08/26 20:14
ZorroGPT
by TipmyPip. 06/06/26 12:36
Zorro 3.01 recoded MMI function issue
by TipmyPip. 06/04/26 05:44
SGT_FW
by Aku_Aku. 05/31/26 11:05
Issues resuming trades on Demo account
by Martin_HH. 05/22/26 13:31
XTB
by pr0logic. 05/18/26 12:27
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (AndrewAMD), 2,372 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Seraphinang, Koti, curry, DeepxKalsi, Samed
19219 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 5 of 8 1 2 3 4 5 6 7 8
Re: Aum 104 [Re: Kartoffel] #392927
01/29/12 18:13
01/29/12 18:13
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline
Serious User
Rackscha  Offline
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
not just every semicolon. or is

for(x;y;z;)

equal to 3 lines o.o


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Aum 104 [Re: Rackscha] #392929
01/29/12 18:37
01/29/12 18:37
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
If you rewrite it to:

x = 0;
while( (x += z) < y )
{
...
}

It's one laugh.

@Kartoffel: I think people made such code also with the previous 200 lines contest, if you don't want to write yourself wink.

Last edited by Joozey; 01/29/12 18:42.

Click and join the 3dgs irc community!
Room: #3dgs
Re: Aum 104 [Re: Joozey] #392934
01/29/12 19:07
01/29/12 19:07
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
@Joozey
Yes I think so, too.
...but I made one for practise smile

If someone needs it:
Click to reveal..
It counts every semicolon in the file 'search_this_file.c'
but ignores semicolons in strings (f.e. str_cpy(temp,"asdf;"); )
Code:
#include <acknex.h>

TEXT* txt = {strings = 10000;}

var count = 0;

function main()
{
	fps_max = 60;
	int i;
	int disable_count = 0;
	int lines = txt_load(txt,"search_this_file.c");
	wait(1);
	i=0;
	while(i<lines)
	{
		while(str_len((txt.pstring)[i]) > 0)
		{
			if(str_cmpni((txt.pstring)[i],"\""))
				disable_count = 1 - disable_count;
			
			if(str_cmpni((txt.pstring)[i],";") && disable_count != 1)
				count++;
			str_clip((txt.pstring)[i],1);
		}
		wait(1);
		i++;
	}
}

PANEL*abc={flags=SHOW;digits(9,9,"Number of semicolons: %.f",*,1,count);}


EDIT: the 2nd wait(1); can be deleted... should be much faster then.

Last edited by Kartoffel; 01/29/12 19:36.

POTATO-MAN saves the day! - Random
Re: Aum 104 [Re: Kartoffel] #392936
01/29/12 19:18
01/29/12 19:18
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
That's very nice Kartoffel! It works well.
Currently 643 semicolons in my unoptimized project laugh. Should be doable.

Last edited by Joozey; 01/29/12 19:18.

Click and join the 3dgs irc community!
Room: #3dgs
Re: Aum 104 [Re: Joozey] #393087
01/31/12 13:02
01/31/12 13:02
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline OP

Expert
George  Offline OP

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
Thank you a lot, Kartoffel! That is a generous contribution.

Re: Aum 104 [Re: George] #393099
01/31/12 16:17
01/31/12 16:17
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
How much lines does the following command count?

pan_create( "bmap=someBitmap; pos_x=100; pos_y=100; flags = SHOW;", 2 );

Also is this allowed?
if( a = 20 ){}

Last edited by Joozey; 01/31/12 23:15.

Click and join the 3dgs irc community!
Room: #3dgs
Re: Aum 104 [Re: Joozey] #393218
02/01/12 15:53
02/01/12 15:53
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline OP

Expert
George  Offline OP

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
Anything is allowed as long as the program runs without crashing our computers. The main requirement is to keep the source code under 5KB; the 200 lines of code are meant to be actual lines of code, not necessarily semicolons.

Re: Aum 104 [Re: George] #393220
02/01/12 15:56
02/01/12 15:56
Joined: Jul 2001
Posts: 6,904
H
HeelX Offline
Senior Expert
HeelX  Offline
Senior Expert
H

Joined: Jul 2001
Posts: 6,904
Originally Posted By: George
the 200 lines of code are meant to be actual lines of code, not necessarily semicolons.


Then I'm out smile or I'll write everything in one line wink

Re: Aum 104 [Re: HeelX] #393225
02/01/12 16:16
02/01/12 16:16
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Originally Posted By: HeelX

Then I'm out smile or I'll write everything in one line wink


Yes but theres still the 5KB limit.

The code that I want to use for the contest has now 2 lines without #include <acknex.h>
but it's already 3.5kb big (and I have got the problem that it crashes sometimes... but I don't know why :/)


POTATO-MAN saves the day! - Random
Re: Aum 104 [Re: Kartoffel] #393228
02/01/12 16:42
02/01/12 16:42
Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
George Offline OP

Expert
George  Offline OP

Expert

Joined: Aug 2003
Posts: 2,011
Bucharest, Romania
This is why the size limit is crucial; otherwise, some of you would "define" a lot of things laugh

Page 5 of 8 1 2 3 4 5 6 7 8

Moderated by  George 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1