Often with AMX Mod X, when debugging or developing scripts, I need to test one or two lines of code. Currently, I have to write a new script with those lines, adding all the normal cruft to it, compile it, edit plugins.ini, and restart the map. For SourceMod, I'd like the ability to enter a line of script code into the console and have it execute for me, returning the results. This would be a command provided by the scripting interface, so, for example
Code:
sm_js p = get_player("malex"); return p.health();
would run the Javascript code, while
Code:
sm_perl return $q =~ s/\w\W3(\d)/$1/;
would run the Perl code.
\malex\