ID:1679518
 
Keywords: codes, executing, ingame
(See the best response by Sir Lazarus.)
Code:
mob/proc
CreateSReward(src.level)
text2file("mob/proc/Reward_[src.key][src.name][src.storiesmade]()","stories/[src.key][src.name][src.storiesmade].dm")
text2file(" spawn()src.Transition()","stories/[src.key][src.name][src.storiesmade].dm")
text2file(" sleep(6)","stories/[src.key][src.name][src.storiesmade].dm")
text2file(" src.Respawn()","stories/[src.key][src.name][src.storiesmade].dm")
text2file(" src.money+=[src.level*100]","stories/[src.key][src.name][src.storiesmade].dm")


Problem description:

I've been able to successfully create codes while in-game, so all I need to know now is how to call created procs while I'm in-game because atm I have to exit, compile, then run. Help me
You can use shell to compile the game, though you'll still need to reboot to get the new code added.Output can be redirected to a text file for reading.

If rebooting is not what you want, it would be better to create a script file that can be ran in the code. Pretty much for this, you create a bunch of commands and then parse them at runtime.

For example:
TRANSITION
WAIT 6
RESPAWN
REWARD MONEY #LEVEL#*100

Then you loop through each line extracting what you need.
Best response
To be more specific: You can't execute arbitrary lines of code while the game is running.

It seems to me that you haven't done your homework. Before you start writing code you first need to find out if you can actually reach your goal.

As suggested by Pirion you only have 2 ways to accomplish your goal:

- Using shell() to compile your code manually but this will still require a reboot of the server.

- Creating your own scripting language by parsing the text or adding an existing scripting language like lua to the game. This is a lot of work.