BelfrySCAD / BOSL2

The Belfry OpenScad Library, v2.0. An OpenSCAD library of shapes, masks, and manipulators to make working with OpenSCAD easier. BETA
https://github.com/BelfrySCAD/BOSL2/wiki
BSD 2-Clause "Simplified" License
1.01k stars 115 forks source link

[BUG] Parser Error on structs.scad when trying to run: `struct_set` #1456

Closed stiggy87 closed 4 months ago

stiggy87 commented 4 months ago

Describe the bug When trying to include the screws.scad and create a screw() or a standard struct get the following error:

Parsing design (AST generation)...
[ERROR: Parser error: syntax error in file structs.scad, line 48](.../OpenSCAD/libraries/BOSL2/structs.scad)
Execution aborted

Code To Reproduce Bug

#include <BOSL2/std.scad>
#include <BOSL2/structs.scad>

$fn=32;

str = struct_set(struct, "answer", 42);

Expected behavior It should not be throwing an error.

Screenshots N/A

Additional context Add any other context about the problem here.

adrianVmariano commented 4 months ago

The parse error is that you put in those '#' characters. OpenSCAD isn't C.

Without then you get the error that "struct" is unknown, which is what should happen.

stiggy87 commented 4 months ago

Thanks! It worked with just one include, so not sure why it wasn't throwing the error earlier. Closing as not a bug.