Creating list of dictionaries returns error "“This block cannot be in a definition”

Hello,

I’m trying to make a list of dictionaries. The added picture shows several methods using the “createPlayer” procedure; which returns a dictionary.

Can someone explain me why I get the error “This block cannot be in a definition” in the initialize global Players2 part? I would have expected this error also occur in procedure “createList”, but there it seems to be oke.

What am I missing?

Edgard

Init global blocks can't run executable code.

Init those lists to empty lists, and do the creation in Screen.Initialize

Thanks for the explanation.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.