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 (AndrewAMD, TipmyPip), 13,353 guests, and 5 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
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,024
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,024
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