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
3 registered members (TipmyPip, AndrewAMD, dBc), 18,430 guests, and 6 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
Page 3 of 3 1 2 3
Re: Is it possible to change panel BMAP? [Re: tolu619] #441999
06/08/14 04:53
06/08/14 04:53
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Originally Posted By: tolu619
My workaround is to use pan_create to create the panel at runtime, then delete the panel and recreate it with the new bmap whenever I need to change the panel.

I guess there's the problem. Do you actually delete/ ptr_remove the panel? Then it's no wonder that the engine crashes when you want to assign a new bmap.
Just reset its SHOW flag instead (and bmap_purge the bmap). Alternatively, if you really want to destroy and remove the panel, set the pointer to NULL after the ptr_remove, then add
if(!PlayerOnePan) PlayerOnePan = pan_create(...)
PlayerOnePan.bmap = GoshawkChosen;


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Is it possible to change panel BMAP? [Re: Superku] #442009
06/08/14 14:05
06/08/14 14:05
Joined: Jun 2014
Posts: 97
Lagos, Nigeria
T
tolu619 Offline
Junior Member
tolu619  Offline
Junior Member
T

Joined: Jun 2014
Posts: 97
Lagos, Nigeria
Originally Posted By: Superku
Originally Posted By: tolu619
My workaround is to use pan_create to create the panel at runtime, then delete the panel and recreate it with the new bmap whenever I need to change the panel.

I guess there's the problem. Do you actually delete/ ptr_remove the panel? Then it's no wonder that the engine crashes when you want to assign a new bmap.
Just reset its SHOW flag instead (and bmap_purge the bmap). Alternatively, if you really want to destroy and remove the panel, set the pointer to NULL after the ptr_remove, then add
if(!PlayerOnePan) PlayerOnePan = pan_create(...)
PlayerOnePan.bmap = GoshawkChosen;


No, I haven't been deleting or ptr_removing the panels. I was saying I would probably do that if nothing else worked. Right now, the code is what I posted above. I define the panel and give it a temporary bmap. Its SHOW flag is not set. I change the bmap with
Code:
PlayerOnePan.bmap = GoshawkChosen;


before I set the SHOW flag. The error message pops up the moment I try to change the bmap.

Re: Is it possible to change panel BMAP? [Re: tolu619] #442011
06/08/14 14:16
06/08/14 14:16
Joined: Jun 2014
Posts: 97
Lagos, Nigeria
T
tolu619 Offline
Junior Member
tolu619  Offline
Junior Member
T

Joined: Jun 2014
Posts: 97
Lagos, Nigeria
Guys! I found my problem! I left an incomplete line of code in a function that was called earlier. Instead of causing an error that would have caused me to discover the incomplete line, the following line logically completed the incomplete line somehow so it messed up my pointers.
Code:
function SoloRace()
{
	CurrentMode.NameOfMode = "Solo Race";
	set(SinglePlayerChooseCharacterPan, SHOW);
	PlayerOnePan = //THIS LINE IS THE CULPRIT. IT SHOULDN'T HAVE BEEN HERE AT ALL!
	reset(SinglePlayerModesPan, SHOW);
	reset(SinglePlayerModesWallpaper, SHOW);
}


Page 3 of 3 1 2 3

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