list variable not defined

Porting a script from the AS Editor to AS Studio, I get a message:

The script works fine in ASEditor though. Thanks to the help of Stefan, I got everythig running with different windows and progress bar :D.

In the beginning of the script, I define the list:

set product_list_for_links to {}

This list gets populated in runtime.

At the very end of the script, an index is created an the following code spits out the mentioned message:

set count_productlist to number of items of product_list_for_links
set products_per_collumn to count_productlist / 6

→ count_productlist not defined

Start to like AS Studio.

Thanx in advance,

Looks like ASS can´t handle

I have replaced it with:

repeat with i in product_list_for_links
set count_productlist to count_productlist + 1
end repeat

which is not very AS like but works fine for me.

in AppleScript number is a class containing a real or integer, not a verb.
The common syntax you need is

count items of product_list_for_links

Thanx Stefan.
I´m curious. Do you know what would be more efficient, my loop or the count?

Thanks to your hints yesterday, the script runs like a charm now. I really appreciate it!

Definitely count