Gamestudio Links
Zorro Links
Newest Posts
Max Number of Strategies in /Strategy folder
by Martin_HH. 08/17/26 07:54
ZorroGPT
by OptimusPrime. 08/15/26 23:39
Pause button for evaluation shell?
by AndrewAMD. 08/13/26 17:16
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/10/26 12:46
phantom() not defined in indicators.c
by jcl. 08/07/26 11:45
Accepting new programming clients
by AndrewAMD. 08/06/26 21:25
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (Lapsa, Martin_HH), 10,323 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
riggi89, shuhari, KD1990, Student_64151, Koti
19230 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