I am having an issue with changing the value of a simple type in my script. I want to pass a string or integer into the engine and change the value in my script and then return the new value out of the scripting engine.
So far…
Set variable
var
v: variant;
begin
with fEngine.Engine.Variables do begin
v := 'this is a test';
SetVariable('person',v);
end;
end;
Script
function main_10047_10034(){
person = "John Doe";
}
Get variable
var
v: variant;
begin
with fEngine.Engine.Variables do begin
v := GetVarVariable('person');
raise exception.create(vartostr(v));
end;
end;
This should return John Doe as the exception message. What am I doing wrong?
Thanks