Gamestudio Links
Zorro Links
Newest Posts
How to buy tomorrow at open?
by frutza. 06/01/23 19:58
Adding Position to Current Trade
by AndrewAMD. 05/30/23 10:34
Unable to change multiplier of contract
by vicknick. 05/30/23 06:56
Wrong Definition of Sharpe Ratio in Zorro?
by vicknick. 05/29/23 06:32
Backtest strategy on bitcoin/crypto
by JamesHH. 05/26/23 04:36
Return type of floor()
by AndrewAMD. 05/25/23 14:17
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
1 registered members (AndrewAMD), 1,065 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
BInnacle, androsa, XquicksnowX, danishinvest, Trail
18942 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
How can I get number of Panel #293960
10/15/09 06:51
10/15/09 06:51
Joined: Mar 2009
Posts: 2
Russia
L
Lowfog Offline OP
Guest
Lowfog  Offline OP
Guest
L

Joined: Mar 2009
Posts: 2
Russia
Hello.
Please, help:
1. I create panel in cycle 0to20:
mypan[n]= pan_create("button=0,0,64,128,bmo,bmon,bmov,fon,frel,fov;");
2. How can I get number n in function fov?

Re: How can I get number of Panel [Re: Lowfog] #293961
10/15/09 07:36
10/15/09 07:36
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Is this what you mean?
Code:
.
   ...
   mypan[n] = pan_create("button=0,0,64,128,bmo,bmon,bmov,fon,frel,fov;");
   (mypan[n]).skill_x = n;
   ...



function fov(PANEL* pan)
{
   var panel_button_number = pan.skill_x;
   ...
}




"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: How can I get number of Panel [Re: Lowfog] #293962
10/15/09 07:36
10/15/09 07:36
Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
Quad Online
Senior Expert
Quad  Online
Senior Expert

Joined: Oct 2007
Posts: 5,209
İstanbul, Turkey
first:
define fov like
function fov(var button_number,PANEL* panel)

second:
after creating your panel with
mypan[n]= pan_create("button=0,0,64,128,bmo,bmon,bmov,fon,frel,fov;");
put this line.
mypan[n].skill_x = n;

then in fov you can get this number back from the skill

like
function fov(var button_number,PANEL* panel){
if(panel.skill_x==2)//panel.skill_x is your "n"
}



:evilsob was faster

Last edited by Quadraxas; 10/15/09 07:37.

3333333333
Re: How can I get number of Panel [Re: Quad] #293963
10/15/09 07:54
10/15/09 07:54
Joined: Mar 2009
Posts: 2
Russia
L
Lowfog Offline OP
Guest
Lowfog  Offline OP
Guest
L

Joined: Mar 2009
Posts: 2
Russia
Thank you!!

Re: How can I get number of Panel [Re: Lowfog] #293965
10/15/09 08:13
10/15/09 08:13
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
DoH!

Quadraxas got me again.
I always forget to include the button_number parameter.
(it IS important, but I seldom use it)

Sorry, but the rest of my code should be ok,
cause Quadraxas's is the same I feel sure of that.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial

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