How do you create a temporary string in script editor?

Game Editor comments and discussion.

How do you create a temporary string in script editor?

Postby DarkParadox » Fri Apr 04, 2008 12:01 pm

How do you create a temporary string in script editor?
User avatar
DarkParadox
 
Posts: 457
Joined: Mon Jan 08, 2007 11:32 pm
Location: USA, Florida.
Score: 84 Give a positive score

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

Postby Troodon » Fri Apr 04, 2008 2:07 pm

strcpy(myactor.text, "blahblahblah");

edit: or strcpy(myvar, "daadirlandaa");
I can't die, I already tried
~on the forums since GE 1.3.3~
User avatar
Troodon
 
Posts: 1539
Joined: Thu Jan 12, 2006 3:29 pm
Location: HELL
Score: 56 Give a positive score

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

Postby DarkParadox » Fri Apr 04, 2008 2:43 pm

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.
User avatar
DarkParadox
 
Posts: 457
Joined: Mon Jan 08, 2007 11:32 pm
Location: USA, Florida.
Score: 84 Give a positive score

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

Postby makslane » Fri Apr 04, 2008 2:54 pm

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.
Game Editor is an open source game creator software that's wants to pay it's developers to keep evolving.
If you like Game Editor, make a review!
makslane
Site Admin
 
Posts: 3947
Joined: Sat Apr 05, 2003 6:47 pm
Score: 182 Give a positive score

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

Postby DarkParadox » Fri Apr 04, 2008 2:58 pm

thats what i wanted, thanks makslane!
User avatar
DarkParadox
 
Posts: 457
Joined: Mon Jan 08, 2007 11:32 pm
Location: USA, Florida.
Score: 84 Give a positive score

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

Postby Game A Gogo » Sun Apr 06, 2008 4:37 am

or
Code: Select all
char*Myvar;
if you want a virtually "infinite" string
Programming games is an art,
    Respect it.
User avatar
Game A Gogo
 
Posts: 3466
Joined: Wed Jun 29, 2005 10:49 pm
Location: French Canada *laughs*
Score: 181 Give a positive score


Return to GE - General

Who is online

Users browsing this forum: No registered users and 1 guest

cron