Hi,
this code non t work.
char NAME[0] = "jiMMY";<---GLOBAL
sprintf(text, "%s", NAME[0]);<_-draw actor
Why?
Tnk1000 for help.
char NAME[6];
strcpy(NAME, "jimmy\0");
char *names[] = {"name_one", "name_two"};
struct hero {
char *name;
int hp;
int mp;
} heroes[2] = { {"hero one\0", 10, 10}, {"hero two\0", 5, 15} };
sprintf(text, "name %d : %s\n", i, heroes[i].name);
hp.textNumber = heroes[i].hp;
mp.textNumber = heroes[i].mp;
Users browsing this forum: No registered users and 1 guest