Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,731 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Digit will not work? #238960
12/01/08 13:27
12/01/08 13:27
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
Code:
//////entitys\\\\\\

ENTITY* arnout;

//////variables\\\\\\

var punten_arnout = 0;
var punt_randy = 0;
var punt_freek = 0;

//////functions\\\\\\

function geef_arnout_punt()
{
	arnout = me;
	set(my,PASSABLE);
	while (my)
	{
		if (key_w == 1)
		{
			if (punten_arnout >= 0)
			{
				punten_arnout += 5;
			}
			else
			{
				punten_arnout += 5;
			}
		}
		wait (1);
	}
}

function main()
{
	video_screen = 2;
	video_mode = 8;
	screen_color.red = 1;
	screen_color.green = 1;
	screen_color.blue = 1;
	fps_max = 250;
	mouse_map = mouse_pcx;
	mouse_mode = 2;
	while (1)
	{
		mouse_pos.x = mouse_cursor.x;
		mouse_pos.y = mouse_cursor.y;
		wait (1);
	}
}

//////panels\\\\\\

PANEL* startmenu =
{
   pos_x = 0;
   pos_y = 0;
   layer = 1;
   bmap = startmenu_pcx;
   digits(35, 10, "Punten van Arnout: %0.f", *, 1, punten_arnout);
   digits(35, 20, "Punten van Randy: %0.f", *, 1, punt_randy);
   digits(35, 30, "Punten van Freek: %0.f", *, 1, punt_freek);
	//button (350, 300, "spel.pcx", "spel.pcx", "spel_over.pcx", zoemer_start, NULL, NULL); //volgend spel
   flags = VISIBLE;
geef_arnout_punt();
}


"punten_arnout" will not change when i press W. What's wrong?

Re: Digit will not work? [Re: n00bie] #238961
12/01/08 13:33
12/01/08 13:33
Joined: Oct 2004
Posts: 4,134
Netherlands
Joozey Offline
Expert
Joozey  Offline
Expert

Joined: Oct 2004
Posts: 4,134
Netherlands
You call a function in a panel declaration. I'm surprised you wont get an error at all.


Click and join the 3dgs irc community!
Room: #3dgs
Re: Digit will not work? [Re: Joozey] #238962
12/01/08 13:37
12/01/08 13:37
Joined: Feb 2007
Posts: 53
N
n00bie Offline OP
Junior Member
n00bie  Offline OP
Junior Member
N

Joined: Feb 2007
Posts: 53
Originally Posted By: Joozey
You call a function in a panel declaration. I'm surprised you wont get an error at all.


I've set the "geef_arnout_punt();" function in the Main function, but it still won't work...


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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