Getting the last clone?
![Post Post](styles/prosilver/imageset/icon_post_target.gif)
Making a health bar where an actor is made for each health gained and the last clone is destroyed for each hp lost. Problem is DestroyActor needs a string. Now I'm trying to get my head around the deadly low level C code I've never had to deal with before. After some googleing this is what I got.
It gives an error of something like "cannot convert from 'char' to 'ARY[255]char'
Can someone please tell me what I'm doing wrong? Or even better please tell me there's an easier way to do this???
- Code: Select all
int index = ActorCount("HP");
index -= 1;
char buffer[255];
char name[255] = "HP."
buffer = (char)index;
name = strcat(name, buffer);
DestroyActor(name);
It gives an error of something like "cannot convert from 'char' to 'ARY[255]char'
Can someone please tell me what I'm doing wrong? Or even better please tell me there's an easier way to do this???