TOUR
PRICING
HELP
Stencylpedia
Blocks Guide
Sample Games
Developer Center
FORUMS
CHAT
#MADEINSTENCYL
EDUCATION
SIGN IN
×
Welcome back!
Username or E-mail
Password
(
Forgot?
)
C
OMMUNITY
Home
Issue Tracker
Inbox [0]
New Posts
New Replies
Search
Stencyl Community
→
Stencyl
→
Ask a Question
→
string to code
Pages:
1
string to code
Max Marin
Posts: 138
May 11, 2021, 02:30:50 pm
Hello I would need the way of a string to pass it to code like:
Code:
[Select]
var mycode = "trace ('asd');";
execute(mycode);
I'm human
Luyren
Posts: 2764
May 11, 2021, 02:48:32 pm
Code must be compiled before your game can run. That is to say, what you are attempting is not possible in such a straight forward way. You can create a script parser of something or the sort as an alternative.
My Stencyl resources are available here:
https://luyren.itch.io/
Cutscenes, RPG Elements, Particles, Map System and many more.
yoplalala
Posts: 1632
May 12, 2021, 08:04:05 am
Hi, Max Marin !
What is your intention ?
You can use a haxe parsing library called hscript
https://github.com/HaxeFoundation/hscript
. Hscript is used by Stencyl itself, so you don't need to download it .
You have to put <haxelib name="hscript" /> in your settings.
Max Marin
Posts: 138
May 12, 2021, 10:39:37 am
I want to write code in a running game and have it run
I'm human
Pages:
1