Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by fairtrader. 12/05/23 14:22
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
0 registered members (), 631 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Problem with panel - change pos_y #281984
07/29/09 19:12
07/29/09 19:12
Joined: Jul 2009
Posts: 5
K
Kubiro Offline OP
Newbie
Kubiro  Offline OP
Newbie
K

Joined: Jul 2009
Posts: 5
Hi,
I want after click on button do function that change pos_y of "PANEL* player_inventory" but I dont know how =(
I tried this:
Code:
function change()
{
	player_inventory.pos_y = 10;
}


But dont help.
Thanks very much.

(P.S.: Sorry for my english, I am czech)

Re: Problem with panel - change pos_y [Re: Kubiro] #281985
07/29/09 19:20
07/29/09 19:20
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
Hi,

Seems like you did it the right way though, are you sure that the function is called at all? Try this to test whether the function was called:

Code:
function change()
{
	player_inventory.pos_y = 10;
	error("panel should have been moved now!");
}



That will make a messagebox appear when the function is called smile

Last edited by Claus_N; 07/29/09 19:21. Reason: typo
Re: Problem with panel - change pos_y [Re: Claus_N] #281986
07/29/09 19:24
07/29/09 19:24
Joined: Jul 2009
Posts: 5
K
Kubiro Offline OP
Newbie
Kubiro  Offline OP
Newbie
K

Joined: Jul 2009
Posts: 5
Error when i press F6
Code:
function change()
{
	player_inventory.pos_y = 10;
	error("panel should have been moved now!");
}
PANEL* player_inventory =
{
	pos_x = 824;
	pos_y = 418;
	layer = 1;
	bmap = player_inventory_bmap;
	button (184, 5, "panel_hide_click.tga", "panel_hide_normal.tga", "panel_hide_over.tga", change(), NULL, NULL);
	flags = SHOW | OVERLAY;
}



Re: Problem with panel - change pos_y [Re: Kubiro] #281988
07/29/09 19:29
07/29/09 19:29
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
try changing this:

flags = SHOW | OVERLAY;

to this:

flags |= SHOW | OVERLAY;

I don't know whether that would make a difference, but forgetting to set the flags the right way on particles make them behave strange. Apart from that it seems fine, though I would put the "change()"-function below the panel definition, but that will probably not make any difference.

Last edited by Claus_N; 07/29/09 19:34.
Re: Problem with panel - change pos_y [Re: Claus_N] #281990
07/29/09 19:34
07/29/09 19:34
Joined: Jul 2009
Posts: 5
K
Kubiro Offline OP
Newbie
Kubiro  Offline OP
Newbie
K

Joined: Jul 2009
Posts: 5
player_inventory.pos_y = 10;

There is problem.. because when I deleted this line, the error window showed without errors. frown
player_inventory is wrong way to panel but why ? frown

Last edited by Kubiro; 07/29/09 19:34.
Re: Problem with panel - change pos_y [Re: Kubiro] #281992
07/29/09 19:41
07/29/09 19:41
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
there's nothing wrong with that line at least, did you try using the "|" while setting the flags?

Here's the thing with the particles I spoke about by the way:
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Main=34314&Number=280580#Post280580

Edit: Well, the "|" doesn't seem to be necessary according to the manual, my bad sorry blush
However I don't see anything wrong in your code then frown

Last edited by Claus_N; 07/29/09 19:47.
Re: Problem with panel - change pos_y [Re: Claus_N] #281993
07/29/09 19:48
07/29/09 19:48
Joined: Jul 2009
Posts: 5
K
Kubiro Offline OP
Newbie
Kubiro  Offline OP
Newbie
K

Joined: Jul 2009
Posts: 5
I changed flags "|" and nothing.
And it still write this error:

ERROR in 'MAIN' line 92: 'player_inventory' undeclared identifier

< player_inventory.pos_y = 10;
>

and on line 92 is

Code:
player_inventory.pos_y = 500;



frown frown

and i cant find change pos_y in manual

Last edited by Kubiro; 07/29/09 19:49.
Re: Problem with panel - change pos_y [Re: Kubiro] #281994
07/29/09 19:52
07/29/09 19:52
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
ahh, well then you just need to place the "change" function below the panel definition wink

Code:
function change();
PANEL* player_inventory =
{
	pos_x = 824;
	pos_y = 418;
	layer = 1;
	bmap = player_inventory_bmap;
	button (184, 5, "panel_hide_click.tga", "panel_hide_normal.tga", "panel_hide_over.tga", change(), NULL, NULL);
	flags = SHOW | OVERLAY;
}
function change()
{
	player_inventory.pos_y = 10;
	error("panel should have been moved now!");
}



Re: Problem with panel - change pos_y [Re: Claus_N] #281995
07/29/09 19:56
07/29/09 19:56
Joined: Jul 2009
Posts: 5
K
Kubiro Offline OP
Newbie
Kubiro  Offline OP
Newbie
K

Joined: Jul 2009
Posts: 5
WOW! Thanks very much Claus_N smile smile
It helps smile

Re: Problem with panel - change pos_y [Re: Kubiro] #281996
07/29/09 20:01
07/29/09 20:01
Joined: May 2004
Posts: 1,510
Denmark
Claus_N Offline
Serious User
Claus_N  Offline
Serious User

Joined: May 2004
Posts: 1,510
Denmark
No problem wink

Page 1 of 2 1 2

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

Gamestudio download | chip programmers | 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