Hi!

I want to set a variable depending on the user input.

Example:

The user says that the variable test should be 2*2 (=4).
He types: "test = 2*2"

(Of course no one would just write 2*2 but perhaps "test = maxv(100,sqrt(223))")

code:
"
#include <acknex.h>
#include <default.c>


var test = 0;

function main()
{

level_load("");
wait(1);

sky_color.red = 1;

var_for_name("test = 2*2");

}



PANEL* Debug_Pan =
{
layer = 200;
flags = VISIBLE;
digits = 100,120,5.2,*,1,test;
}
"

This should set the variable "test" to 4 (2*2). But that doesn't work....the variable is 2 after the execution of the function...

Is there any function that can do this?