Page 1 of 1

Error (Solved)

PostPosted: Sat Jun 24, 2006 10:45 am
by DilloDude
When I activate this code:
Code: Select all
char *itm;
Actor *I;
Actor *ITEM;
I = getclone2("ChestItem", cloneindex);
strcpy(itm, I->text);
animpos = 1;
ITEM = CreateActor(itm, itm, "no parent", "no path", 4, 0, false);
ITEM->xvelocity = 2;
ITEM->yvelocity = 1;

I get this error:
Image
ChestItem.0's text is "GoldCoin", which is the name of an actor with the same animation name. What could be causing this?

PostPosted: Sat Jun 24, 2006 10:01 pm
by DilloDude
I managed to solve this by changing
Code: Select all
char *itm;

to
Code: Select all
char *itm = "PUTTHENAMEOFYOURITEMHERE";

It is the same as the problem I mentioned here. I don't know why it happens, and with some script it doesn't seem to do it, but in this case it did. So if you do get problems like that, there is one thing you can try.