i can't seem to get a simple function to work
if enter a simple function within a button and then call it, i get an error saying that it can't be found
there is no error when i compile the script within the button, so what gives? where do you place a function that you've created and want to call?
functions
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: functions
Hi ianmitroff,
And welcome on this forum
Can you post your function. It is to easy for help you
Best regards
Jean-Marc
And welcome on this forum
Can you post your function. It is to easy for help you
Best regards
Jean-Marc
https://alternatic.ch
Re: functions
My guess without seeing your code is that you're calling it with the syntax of a command instead of a function
Code: Select all
on mycommand
put "hello, world"
end mycommand
function myfunction
return 3
end myfunction
mycommand -- execute the command "mycommand"
put myfunction() -- return the result of the function "myfunction"
myfunction -- wrong calling syntax
Re: functions
I would put the function in the card script if only used on that card, otherwise the stack script if other cards call this function.
Hope this helps.
Hope this helps.