Here are my debugging ideas laugh

Code:
//bmap definition
BMAP* GoshawkChosen = "GoshawkCharacterChosen.bmp";
BMAP* tempPan_bmap = "tempPan.bmp";

//Panel definition
PANEL* PlayerOnePan =
{
	bmap = tempPan_bmap;
	pos_x = 20;
	pos_y = 100;
	layer = 8;
	flags = OVERLAY;
}

//last line of this function is the relevant code
function ChooseGoshawk()
{
	ChosenMonIndex = 1;
	str_cpy(ChosenMonster, "Goshawk");
	str_cpy(MonsterDetailsString, GoshawkDetailsString);
	str_cpy(MonsterConfigString, GoshawkConfigString);
	
	
	str_cpy(CreateRandomButton, "pos_x = 328; pos_y = 450; button=0, 0, RandomButton, RandomButton, RandomButtonBrite, ChooseRandomMon, NULL, NULL; flags |= OVERLAY | SHOW;");
	
	
	set(MonsterDetailsText, SHOW);
	set(MonsterConfigText, SHOW);
beep();
	PlayerOnePan.bmap = GoshawkChosen;
	return;
	
	
}

	//when you call this function in another part of your script, just after it, place a wait_for();
	//ChooseGoshawk();
	//wait_for(ChooseGoshawk);

//Then in a different function, I call
set(PlayerOnePan, SHOW);
//but the problem isn't here, it's in the "PlayerOnePan.bmap = GoshawkChosen" line



Im limited by no knowing how your entire script is executed, but I hope this is helpful


Also, another debugging idea is to use the beep(); function to hear if your script has made it to the beep or not. In this case, I've placed a beep just before the bmap change, if it gets that far, it will beep, which means the problem is the line after the beep.

Last edited by DLively; 06/07/14 17:38. Reason: Misread some code :/

A8 Pro 8.45.4
YouTube: Create Games For Free
Free Resources: www.CGForFree.com