Adventure Game Studio

AGS Support => Beginners' Technical Questions => Topic started by: loominous on Tue 23/09/2003 12:10:38

Title: Setting string content
Post by: loominous on Tue 23/09/2003 12:10:38
What s the equivalent of:

int variable;

variable == 1;

when you re using strings?

That is what should be the second line here:

string variable;

(variable == ("New content"); ) <-------- ?
Title: Re:Setting string content
Post by: Ishmael on Tue 23/09/2003 12:27:18
I am not RTFM'ing you, but....

StrCopy

StrCopy (string str1, string str2)

Copies the contents of STR2 into STR1, overwriting STR1's original contents. Use this instead of the assignment STR1=STR2 .
Example:

string message;
StrCopy(message,"This is a message");

will result a string message that will be "This is a message"
Title: Re:Setting string content
Post by: loominous on Tue 23/09/2003 12:32:10
Thanks, I did read that section in the manual but didn t see the relevance.