Hi, I'm having issues getting custom functions to work.
I'm on LC 7.1 on Mac
I've tried applying the example functions provided in the LC documentation (below) but when I click "Apply" I get an error near "function". Don't understand... and my app is going to be crazy without callable functions...
Tx in advance for your help.
Matt
function Summy
put 1 + 1 into tSummy
return tSummy
end Summy
or
function myFunction
return "test"
end myFunction
or
function boomboom
answer "Boom"
end boomboom
Custom Functions not working for me? What am I doing?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
Mattjwlittler
- Posts: 4
- Joined: Sun Sep 11, 2016 12:20 pm
Re: Custom Functions not working for me? What am I doing?
Hi Matt
Welcome to this forum
Amazing !
I tested your three functions without error (Mac, LC 7.06,7.1, indy).
Best regards
Jean-Marc
Welcome to this forum
Amazing !
I tested your three functions without error (Mac, LC 7.06,7.1, indy).
Best regards
Jean-Marc
https://alternatic.ch
-
Mattjwlittler
- Posts: 4
- Joined: Sun Sep 11, 2016 12:20 pm
Re: Custom Functions not working for me? What am I doing?
Thanks Jean-Marc. I'll do some more testing with a new stack / different version of LC.
-
Mattjwlittler
- Posts: 4
- Joined: Sun Sep 11, 2016 12:20 pm
Re: Custom Functions not working for me? What am I doing?
There's a lesson. Always try what you're doing with a clean slate if it doesn't work the way you think. I was trying to declare it inside the on OpenCard... 
Re: Custom Functions not working for me? What am I doing?
I was trying to declare it inside the on OpenCard... 
Congratulation. You now can do
Congratulation. You now can do
Code: Select all
on opencard
get summy()
answer it
end opencardhttps://alternatic.ch
-
Mattjwlittler
- Posts: 4
- Joined: Sun Sep 11, 2016 12:20 pm
Re: Custom Functions not working for me? What am I doing?
Exactly. Calling inside events is what I want - obviously declaring there doesn't help anyone...
