Hey guys, I've got a Problem.
Its difficult to explain but i hope you can help me.

I have 2 functions
the first has two parameters


function set_cardpos(PANEL* panel, position)
{
[...]
}


the second function is just a normal function. I work with panels. I've got a panel for every card that should appear depending on the card amount the player got.

now i want to make a loop that saves a lot of work.
it looks like this:

while(counter < cards+1)
{
str_cpy(cardname, "atk_card");
str_for_num(cardnum, counter);
str_cat(cardname, cardnum);

set_cardpos(cardname, 250);

counter += 1;
wait(1);
}

this while loop is element of the second function.
i wanted to create a string that holds the name of the panel. when the parameters reach the other function it should add the name of the desired panel for "panel" but it doesn't do this. nothing happens. when i type in the desired panel myself (f.e. "atk_card1") for "cardname" in the "set_cardpos(cardname, 250);"-line it does work.

do you know whats the matter about this?

i hope so

best regards
Roxas

Last edited by Roxas; 01/06/10 17:09.