int i;
var v;
STRING* sAuthor = str_create("");
STRING* sVersion = str_create("");
//GSTScript_SetGlobalString(_str("author"), _str("set author from lite-c")); //uncomment to overwrite the global string author from lite-c
while(1) {
mouse_pos.x = mouse_cursor.x;
mouse_pos.y = mouse_cursor.y;
wait(1);
GSTScript_NotifyListener(_str("GSTError")); // notify an gst standard listener
GSTScript_GetGlobalInt(_str("gCounter"), i); // read a global lua int
GSTScript_GetGlobalVar(_str("gVarCounter"), v); // read a global lua var
GSTScript_GetGlobalString(_str("author"), sAuthor);// read a global lua string
GSTScript_GetGlobalString(_str("version"), sVersion);// read a global lua string
draw_text(sAuthor,100,300,vector(250,520,520)); //draw strings
draw_text(sVersion,100,320,vector(250,520,520));
diag_var("\nlite-c: ELAPSED TIME = %1.5f",i); //diag lua global numbers
diag_var("\nlite-c: gVarCounter = %1.5f",v);
diag("\nlite-c:"); diag(sAuthor); // diag strings
GSTScript_SetGlobalInt(_str("gCounter"), i + 1); // change a global lua int
GSTScript_SetGlobalVar(_str("gVarCounter"), v + 0.1); // change a global lua number
}