Okay, string setting should be done by strcpy. This is just how it is.
- Code: Select all
strcpy(ATTORE[0]->NAME,"heroe");
This string you used is a char*? That would be my preference.
You cannot do actor.1.variable. This is not allowed, instead you can use the getclone function, I believe, or some derivative. What are you trying to do? Is WRITE1 an actor? If so, I believe there is a better way to do what you want it to do, but I can't tell with the given information. Anyway, you would just pass it a pointer to the actor struct of WRITE1, and point it to text.
This is Cleve Blakemore's version of the getClone derivatives. It would go into global code;
- Code: Select all
Actor * getCloneIdx (const char *cname, int cindex) //g_GetCloneByIndex, its original name
{
char buffer[50];
sprintf(buffer,"%s.%i",cname,cindex);
return(getclone(buffer));
}
Then you call it to get the Actor* to WRITE1. So it would be called as such,
- Code: Select all
sprintf(getCloneIdx(WRITE1, 1)->text ,ATTORE[0]->NOM);
Or if you are using this multiple times in script, you could create temp Actor*, set that to the getCloneIdx, and use that. I believe that answers your question.