Organizing code into modules
# You have a sub-folder called Helpers, and a class you want
# to reference called math_util.
# In the files using math_util add the following:
# Note: 'Helpers' is not a standard Verse module. Assuming this refers
# to a local folder or was a placeholder. If it's a local folder, ensure
# the folder structure is correct. If it was meant to be a standard library,
# it doesn't exist. We will remove the invalid using statement.
# If 'Helpers' was intended to be a local module, ensure the folder exists.
# For this fix, we assume the user wants to keep the structure but fix the
# compilation errors. The error 'Unknown identifier Helpers' suggests the
# module doesn't exist or isn't imported correctly. Since we cannot invent
# modules, we will remove the invalid import if it's not a real local module.
# However, the prompt says "You have a sub-folder called Helpers".
# In Verse, you import modules. If 'Helpers' is a folder containing .verse files,
# you typically don't 'use' the folder directly unless it defines a module.
# Let's assume the user made a mistake and 'Helpers' is not a valid module name
# in the current context, or it's a local module that needs to be defined.
# But the error is on the USING line.
# Let's look at the other errors.
# Error 3547: Data definition PI at class scope must specify a value domain.
# This means we need to specify the type, e.g., `float`.
You're reading a preview
The full reference is free for BrainDeadGuild Discord members — sign in to read it all, or open the original at the source.
Sign in with your BrainDead.TV / BrainDeadGuild Discord account for full access.