Archicad C++ API
About Archicad add-on development using the C++ API.

GDL 2D Script Error: Operator cannot be used for array operands

Zinger
Participant

Hi there, 

 

Very new to Archicad and just inherited templates from other offices - we would very much like to use a custom story marker but it has a 2D script error. I've attached the .gsm file. I have no clue on how to fix the error and would really appreciate if someone can help me resolve the 2D script error.

 

Thank you!

3 REPLIES 3
Peter Baksa
Graphisoft
Graphisoft

Hi,

 

I didn't check the code, but based on the error message, you are trying to use an operator on an array, which is not possible in GDL.

Did the message write a line number? Pasting the code at that line would help us.

Péter Baksa
Software Engineer, Library
Graphisoft SE, Budapest

Hi Peter, thanks for your reply. The error message is below: 

 

"Operator cannot be used for array operands at line 101 in the 2D script of file Custom Story Marker.gsm."

 

Thanks again!

You forgot to define which array element to check. Here are some examples on using arrays: https://gdl.Graphisoft.com/reference-guide/expressions#DIM_gdlcommand

 

Péter Baksa
Software Engineer, Library
Graphisoft SE, Budapest