When I try and run this code it says crash in main
for (Count; Count <= 24; Count++)
{
if (Count <= 2)
{
CardCountUnc[Count] = 18;
}
else if (Count == 3) // Setup of unchanged card number array
{
CardCountUnc[Count] = 10;
}
else
{
CardCountUnc[Count] = 2;
}
}
Count = 0;
for (Count; Count <= 24; Count++)
{
CardCountCha[Count] = CardCountUnc[Count]; // Setup of changed card number array
}
random_seed(0);
Count2 = 0;
Count = 0;
CardNumberZero = 1;
for (Count2; Count2 <= 4; Count2++)
{
while (CardNumberZero == 1)
{
CardDrawNumber = rand() % 24; // Deal out players hand
for (Count; Count <= 24; Count++)
{
if (CardDrawNumber == Count)
{
if (CardCountCha[Count] > 0)
{
PlayerHand[Count2] = CardDrawNumber;
CardCountCha[Count]--;
CardNumberZero = 0;
// ChangeCardMap(CardDrawNumber,Count2);
PanelName = PanelChangeName(Count2);
CaPicture = FindCardPicture(CardDrawNumber);
ChangeCardMap(PanelName, CaPicture);
}
}
}
}
CardNumberZero = 1;
Count = 0;
}
}
function PanelChangeName(var Number)
{
STRING* PlayerCardPanelName;
if (Number == 0)
{
PlayerCardPanelName = "PlayerCardOne";
}
if (Number == 1)
{
PlayerCardPanelName = "PlayerCardTwo";
}
if (Number == 2)
{
PlayerCardPanelName = "PlayerCardThree";
}
if (Number == 3)
{
PlayerCardPanelName = "PlayerCardFour";
}
if (Number == 4)
{
PlayerCardPanelName = "PlayerCardFive";
}
return (PlayerCardPanelName);
}
function FindCardPicture(var Card)
{
BMAP* CardPicture;
if (Card == 1)
{
CardPicture = SetUpTentOne;
}
return (CardPicture);
}
function ChangeCardMap(Name,BMAP* Picture)
{
pan_setbmap(Name,3,1.0,Picture);
}
I am trying to pass the panel name and the name of the bmap to a function that will change the button based on this information. I would appreciate any help I can get.