sample path code getting error
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
sample path code getting error
Can't see why this is error-ing
rebuilding visual programming app originally created in 1993 as Hypercard stack
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: sample path code getting error
If that's being call from a substack, it will have no filename itself. You can get the filename of its mainstack by using the "effective" keyword, e.g.:
Tip: When posting code here please post the text itself (ideally between code tags) rather than a screen shot to make it easier for others revise it for you.
Code: Select all
put the effective filename of this stack into nameToSave
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
Re: sample path code getting error
Got it - Thanks FourthWorld
Still getting error:
stack "Planner11": compilation error at line 14 (Chunk: can't create a variable with that name (explicitVariables?)) near "nameToSave", char 45
Still getting error:
stack "Planner11": compilation error at line 14 (Chunk: can't create a variable with that name (explicitVariables?)) near "nameToSave", char 45
Code: Select all
function path
put the effective filename of this stack into nameToSave
set the itemDelimiter to slash
put item 1 to -2 of nameToSave & slash into tPath
return tPath
end path
rebuilding visual programming app originally created in 1993 as Hypercard stack
Re: sample path code getting error
OK - I see that I recently activated "strict compilation"... getting errors on several of my scripts that previously worked OK. Deactivated that and I'm fine for now.
rebuilding visual programming app originally created in 1993 as Hypercard stack
Re: sample path code getting error
Hi Mel,
"strict compilation" requires to declare every single local variable you are using in your scripts or it will "rain" errors!
Best
Klaus
"strict compilation" requires to declare every single local variable you are using in your scripts or it will "rain" errors!

Best
Klaus
Re: sample path code getting error
Wow, that code block looks familiar to me. Weird.