I just rewrote you code and it works without a problem:
Code:
#include <acknex.h>
#include <default.c>
var a = 1;
var b = 2;
var c = 0;
PANEL* pDisplay =
{
digits(35,10,"a = %0.f",*,1,a);
digits(35,19,"b = %0.f",*,1,b);
digits(35,28,"c = %0.f",*,1,c);
flags = VISIBLE;
}
function main()
{
video_mode = 6;
screen_color.blue = 150;
while(1)
{
c = a+b;
wait(1);
}
}
Other than that function is C-Script, use the datatype of the return value instead which doesn´t exist in your function main and thus "function" should be "void" in the case. But that has nothing to do with your problem...