Sorry to be so dense about Squirrel but…
I have some code that calls a function:
foo (variable);
server.log("write " + variable);
local othervariable = variable * (some numbers); etc.
which looks like:
function foo (temp) {
local a = i2c.read(some stuff);
temp = a[0] * (some numbers);
return temp;
but the IDE complains that variable is undefined. What is the correct way to have a function return a “global” integer for use by the “main” program?