Page 1 of 1

How do you create a temporary string in script editor?

PostPosted: Fri Apr 04, 2008 12:01 pm
by DarkParadox
How do you create a temporary string in script editor?

Re: How do you create a temporary string in script editor?

PostPosted: Fri Apr 04, 2008 2:07 pm
by Troodon
strcpy(myactor.text, "blahblahblah");

edit: or strcpy(myvar, "daadirlandaa");

Re: How do you create a temporary string in script editor?

PostPosted: Fri Apr 04, 2008 2:43 pm
by DarkParadox
no, not to change the string but to create a TEMPORARY string var:
you know how int creates a temporary integer? well I want to know how to do somthing like that to create the string.

Re: How do you create a temporary string in script editor?

PostPosted: Fri Apr 04, 2008 2:54 pm
by makslane
Just use:

Code: Select all
char yourvarname[50]; //For a string with a max of 50 chars


This string will be valid only inside the current script.

Re: How do you create a temporary string in script editor?

PostPosted: Fri Apr 04, 2008 2:58 pm
by DarkParadox
thats what i wanted, thanks makslane!

Re: How do you create a temporary string in script editor?

PostPosted: Sun Apr 06, 2008 4:37 am
by Game A Gogo
or
Code: Select all
char*Myvar;
if you want a virtually "infinite" string