Wondered if someone could help ?
I'm new to LiveCode (come from years of VB, PCS, Corona and various others) and am following the various tutorials to 'port' an existing PCS app into LiveCode.
I fell at the first hurdle !! I'm trying to create a 'Global' variable. One which will be available to all handlers on all cards within a stack. Currently I have the line :
Code: Select all
global gbABC
Each time I try to 'Apply' the use of the variable to any handler on a Card within the Stack I receive the error message :
button "chkMaintenance": compilation error at line 4 (Chunk: can't create a variable with that name (explicitVariables?)) near "gbABC", char 16
or very similar !
Can someone nudge me in the right direction please ?
Is there any basic help on how to declare variables and assign them 'types' (numeric, floating, string, boolean etc). I have read (and think I understand) the variable 'scope' logic within LiveCode - all makes sense but can't find how to declare a type and for the life of me (all day yesterday) can't work out why I can't access my global accross various Cards within my Stack.
Any and all kicks in generally the right direction would be welcome.
Thanks in advance.