Errors
As you type grid notation, GuideGuide displays errors it finds. These can be used to troubleshoot problems and understand mathematical limitations of some more complex uses of grid notation.
Unknown Command
This error occurs when you type something that grid notation does not recognize as a command.
| hoobastank |
# Unknown command "hoobastank"
#
# | hoobastank |
# ^^^^^^^^^^
Unexpected Fill
This error occurs when you place a fill * after a command that does not support it.
|*
# Unexpected fill command. The command of type "wildcard" cannot be filled.
#
# |*
# ^
Unexpected Repeat
This error occurs when you place a repeat *N after a command that does not support it.
~*2
# The command of type "guide" cannot be repeated.
#
# |*2
# ^^
Nothing to repeat
This error occurs when a multiple *N has no command before it to repeat, such as at the start of a grid.
*2
# Nothing to repeat.
#
# *2
# ^^
A multiple must sit directly after the command it repeats, so options can’t go between them.
10px (v) *2
# Nothing to repeat.
#
# 10px (v) *2
# ^^
The same happens when you repeat a variable that contains no commands.
$ = (v)
$*2
# Nothing to repeat.
#
# $*2
# ^^
The error can be resolved by placing the command to repeat before the multiple.
| 10px*2 | (v)
Multiple after a multiple
This error occurs when a multiple *N directly follows another multiple. Multiples can’t be chained.
10px*2*2
# A multiple can’t follow another multiple.
#
# 10px*2*2
# ^^
The error can be resolved by combining them into one multiple.
| 10px*4 | (v)
Undefined Variable
This error occurs when you reference a variable before you declare it.
| $hoobastank |
# Variable "$hoobastank" is not defined.
#
# | $hoobstank |
# ^^^^^^^^^^
Fill without commands
This error occurs when you make a fill from something that does not contain any commands.
*
# Fill does not contain commands
#
# *
# ^
The same happens in a variable that starts with a fill, even if the variable is never used.
$a = *
| 10px |
# Fill does not contain commands
#
# $a = *
# ^
More than one fill
This error occurs when you use more than one fill in a grid.
10px* 10px*
# Cannot calculate fill, command does not have a size.
#
# 10px* 10px*
# ^
Uncalculated size
This error occurs when you reference a variable that does not have an explicit size.
$ = ~
| ~ | ($)
# Cannot use variable "$" as a reference. It does not have a defined size.
#
# | ~ | ($)
#
Resolve the error by providing a size for the referenced variable.
$ = ~ ($WIDTH)
| ~ | ($)
Fills containing wildcards
This error occurs when you try to fill a variable that contains a wildcard.
$ = ~
$*
# Fills may not be used with variables containing wildcards.
#
# $*
# ^
This error can be resolved by removing the wildcard or setting an explicit size for the variable to force the wildcard to be calculated.
$ = ~ ($WIDTH)
$*
No Results
This error occurs when you fail to close parenthesis or brackets.
10px {
# No results. This usually means you’ve forgotten to close parenthesis or brackets.
The error can be resolved by closing the parenthesis or brackets causing the problem.
No block at index
This error occurs when you try to reference a block that does not exist.
$ = { ~ }
$[10]
# No block at index "10".
#
# $[10]
# ^^
The error can be resolved by referencing the correct index.
$ = { ~ }
$[1]
Unexpected end of options
This error occurs when you use close options without opening them first.
| ~ | ) vnl
# Unexpected end of options. ")" must be proceeded by "("
#
# | ~ | ) vnl
# ^
Unexpected end of block
This error occurs when you use close a block without opening it first.
| ~ | }
# Unexpected end of block. "}" must be proceeded by "{"
#
# | ~ | }
# ^
Unexpected end of accessor
This error occurs when you use close an accessor without opening it first.
| ~ | ]
# Unexpected end of accessor. "]" must be proceeded by "["
#
# | ~ | ]
# ^