property is not an interger?
Sarah Reichelt
sarahr at genesearch.com.au
Tue Jul 6 18:20:38 EDT 2004
I'm not sure why you are getting the error, but there is a certain
amount of redundancy in your script. Improving it might get rid of the
error. I suggest this, where you setup the loop to delete the cards you
want, instead of requiring a test for every card:
on tryAgain
repeat with i = the number of cards down to 2
delete card i
end repeat
end tryAgain
In your script, i is already the number of the card, so your "if" line
is effectively saying "if the number of card 1 is greater than 1 then".
If you wanted to do it that way, you could just use "if i > 1 then"
One other possible cause for the error could be if you are deleting the
card containing the running script. When you use "delete card" it
deletes the current card, you are not going to a particular card or
specifying a particular card for deletion.
Cheers,
Sarah
On 6 Jul 2004, at 8:05 pm, Rich Lague wrote:
> I can't seem to get the script below to work. When I try to examine it
> with the debugger I get, "Error description: Object: property is not an
> integer"
>
> Is there some way to tell what property is the problem?
>
> Thanks!
>
> Rich Lague
>
> ----------------------------------------------------------
>
>
> on tryAgain
> repeat with i = the number of cards down to 1
> if the number of card i > 1 then
> delete card
> end if
> end repeat
> end tryAgain
More information about the use-livecode
mailing list