Gamestudio Links
Zorro Links
Newest Posts
SGT_FW
by Aku_Aku. 11/30/26 08:19
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
0 registered members (), 12,233 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
ptr_for_handle #221027
08/11/08 18:01
08/11/08 18:01
Joined: Jul 2008
Posts: 18
Y
YNG Offline OP
Newbie
YNG  Offline OP
Newbie
Y

Joined: Jul 2008
Posts: 18
I don't exactly know if ptr_for_handle has a bug or not; but after some searchin on the forum and manual i thought there might be a bug at the ptr_for_handle function. When i save a panel's handle to a variable and callback the panel's pointer from ptr_for_handle i get an error message or my code doesnt work right. I made a test both with an entity and a panel. For entity everythng works perfect as it has to be but when it comes to panel problem beguns. Is thre something i have to do extra to convert a panels handle to a pointer; or is this a bug?? If u reply me with info about it i ll be real glad. I ll try a workaround or wait for next update to change the script of my project according to ur reply...
Best Regards

PS: I use A7 10.1 Comm. Edition...
I also added the script of my test to the bottom of the post...

Code:
#include <acknex.h>
#include <default.c>

PANEL* dummy_pan;
ENTITY* dummy_ent;

var handle_var;

void main()
{
	wait(4);
	level_load("villa_terrain_2.hmp");
	wait(4);
	camera.tilt=-15;
	
	dummy_pan=pan_create("bmap = 350z_tablo.bmp;",1);
	handle_var = handle(dummy_pan);
	you=ptr_for_handle(handle_var);
	set(you,VISIBLE);
	
	wait(2);
	
	dummy_ent=ent_create("masa4.mdl",vector(0,0,0),NULL);
	handle_var = handle(dummy_ent);
	you=ptr_for_handle(handle_var);
	set(you,TRANSLUCENT); 
}


Model becomes transparent, but panel doesnt become visible with ptr_for_handle.

Re: ptr_for_handle [Re: YNG] #221091
08/12/08 09:14
08/12/08 09:14
Joined: Jul 2000
Posts: 28,149
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,149
Frankfurt
you=ptr_for_handle(handle_var);

You is an ENTITY* pointer. Entities and panels are different things and can not be assigned to each other in the code.

Re: ptr_for_handle [Re: jcl] #221108
08/12/08 12:10
08/12/08 12:10
Joined: Jul 2008
Posts: 18
Y
YNG Offline OP
Newbie
YNG  Offline OP
Newbie
Y

Joined: Jul 2008
Posts: 18
Thank you for the info. I just updated my code considerin the thng you said and my problem has been solved. Sorry for my mistake and thank you again...


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