|
|
Re: Access string content through another string
[Re: ChrstphFr]
#473785
08/15/18 02:25
08/15/18 02:25
|
Joined: Feb 2013
Posts: 122 Maysville, Ga
Evo
Member
|
Member
Joined: Feb 2013
Posts: 122
Maysville, Ga
|
Hi ChrstphFr, If you're talking about just copying one string into another, you can do that by using :
str_cpy(name_str, content_str);
This will overwrite "name_str" with whatever string you choose and can be changed at anytime within your code.
|
|
|
Re: Access string content through another string
[Re: Superku]
#473788
08/15/18 09:30
08/15/18 09:30
|
Joined: Aug 2016
Posts: 15
ChrstphFr
OP
Newbie
|
OP
Newbie
Joined: Aug 2016
Posts: 15
|
Thank you Superku! I got it to work with engine_getvar.
STRING* LookAt_msg = " ";
STRING* msg_1 = "This is a test.";
...
STRING** temp_msg = (STRING**)engine_getvar(_chr(my.string1),NULL); // entity.string1 is "msg_1"
str_cpy(LookAt_msg,*temp_msg); // LookAt_msg now is "This is a test."
Last edited by ChrstphFr; 08/15/18 09:46.
|
|
|
|
|
|