Error (Solved)

Non-platform specific questions.

Error (Solved)

Postby DilloDude » Sat Jun 24, 2006 10:45 am

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?
Last edited by DilloDude on Sat Jun 24, 2006 10:05 pm, edited 1 time in total.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score

Postby DilloDude » Sat Jun 24, 2006 10:01 pm

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.
Image
User avatar
DilloDude
 
Posts: 866
Joined: Tue Jan 24, 2006 9:51 am
Location: Nyerellion
Score: 58 Give a positive score


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest