about global code function...

when i write a function, such as:
int returnString(char* str)
{
char ss[128];
strncpy(ss, str, strlen(str));
ss[128] = 0;
sprintf(text_actor.text, "%s", ss); // no functional, beacuse i can't see the text from text_actor
return 1;
}
// but i write in script code , it ok, why ?
have any body know? thanks...
int returnString(char* str)
{
char ss[128];
strncpy(ss, str, strlen(str));
ss[128] = 0;
sprintf(text_actor.text, "%s", ss); // no functional, beacuse i can't see the text from text_actor
return 1;
}
// but i write in script code , it ok, why ?
have any body know? thanks...