rocinantealpha

messages

When something in a sketch is wrong, rocinante says where, says what went wrong in plain words, and shows a line that would work. These are all of its messages, each with a sketch that gives it and the message as it appears.

A comment starts with two slashes

circle at 100 100 radius 50 # the circle
── A comment starts with two slashes ────────────────── sketch.roci:1:29

1 │ circle at 100 100 radius 50 # the circle
  │                             ^

A hash is for colors, like `#ff8800`. A comment starts with two slashes and runs to the end of the line.

Write:  circle at 100 100 radius 50 // the circle

A condition asks, it does not assign

score = 1if score = 10 [  fill red]
── A condition asks, it does not assign ─────────────── sketch.roci:2:10

2 │ if score = 10 [
  │          ^

A single equals sign gives a name a value. To ask whether two things are the same, write `is`.

Write:  if score is 10 [

A condition has to be true or false

x = 1if x [  fill red]
── A condition has to be true or false ───────────────── sketch.roci:2:4

2 │ if x [
  │    ^

`if` asks a question, so what follows it has to be a comparison like `x > 10`, or a name that holds true or false. Here it is a number.

Write:  if x > 0 [

A default is one value

learn star size with points 5 6 [  turn points]
── A default is one value ───────────────────────────── sketch.roci:1:31

1 │ learn star size with points 5 6 [
  │                               ^

After `with`, each optional word is followed by exactly one value, like `points 5`. Put anything bigger in round brackets.

Write:  learn star size with points 5 [

A gradient is a list of colors, and this list holds a list

colors = [ red teal ]background [colors] as conic angle 45
── A gradient is a list of colors, and this list holds a list ─── sketch.roci:2:12

2 │ background [colors] as conic angle 45
  │            ^^^^^^^^

A list used where a color goes makes a gradient, so every item in it has to be a color. If the colors are in a name already, use the name without square brackets around it.

Write:  background colors as conic angle 45

A line cannot start with a color

#add this later
── A line cannot start with a color ──────────────────── sketch.roci:1:1

1 │ #add this later
  │ ^^^^

`#add` is read as a color, but a line has to start with a word. If you meant a comment, start it with two slashes, not a hash.

Did you mean:  // add this later

A line has to start with a word

42 circle
── A line has to start with a word ───────────────────── sketch.roci:1:1

1 │ 42 circle
  │ ^^

`42` cannot start a line. A line starts with a verb, a keyword or a name.

Without it:  circle

A vector or a record, not both

q = { x: 1, 2, 3 }
── A vector or a record, not both ───────────────────── sketch.roci:1:13

1 │ q = { x: 1, 2, 3 }
  │             ^

Curly brackets with names, like x: 1, make a record. Curly brackets without names make a vector. One pair cannot be both.

As a vector:  q = { 1, 2, 3 }

A verb is not called with round brackets

circle(100, 100, 50)
── A verb is not called with round brackets ──────────── sketch.roci:1:1

1 │ circle(100, 100, 50)
  │ ^^^^^^^^^^^^^^^^^^^^

A verb is followed by its arguments, with no brackets and no commas. Round brackets are for grouping a value that needs working out.

Write:  circle at 100 100 radius 50

A window is changed with `set`

control = window size 300 200control.resizable = false
── A window is changed with `set` ────────────────────── sketch.roci:2:1

2 │ control.resizable = false
  │ ^^^^^^^^^^^^^^^^^^^^^^^^^

`control.resizable` is a setting of a window. A window that is open is changed with the verb `set`, then the window, then the settings as in `window`.

Write:  set control resizable false

An else needs an if before it

else [  fill blue]
── An else needs an if before it ─────────────────────── sketch.roci:1:1

1 │ else [
  │ ^^^^

An `else` continues an `if`: it goes right after the closing square bracket of the if's block.

After an if:
    if condition [ ... ]
    else [

An item of a list is read with `item`

colors = [ red teal gold ]i = 2x = colors[i + 1]
── An item of a list is read with `item` ─────────────── sketch.roci:3:5

3 │ x = colors[i + 1]
  │     ^^^^^^^^^^^^^

Square brackets write lists and blocks, so `colors[i + 1]` is not how to read an item. Say which item and of what: the first item is number 1.

Write:  x = (item (i + 1) of colors)

Arguments are not separated by commas

circle at 100, 100 radius 50
── Arguments are not separated by commas ────────────── sketch.roci:1:14

1 │ circle at 100, 100 radius 50
  │              ^

Write the arguments one after another with spaces. Commas are only for vectors and records.

Write:  circle at 100 100 radius 50

Hint: Three brackets deep is hard to read

x = (((1 + 2) * 3) + 4)
── Hint: Three brackets deep is hard to read ─────────── sketch.roci:1:7

1 │ x = (((1 + 2) * 3) + 4)
  │       ^

Give the inner value a name on the line above, and use the name here.

Write:
    value = 1 + 2
    x = ((value * 3) + 4)

Hint: `other` and `ball` are the same value

ball = { x: 1 }other = ballother.x = 5
── Hint: `other` and `ball` are the same value ───────── sketch.roci:3:1

3 │ other.x = 5
  │ ^^^^^

`other` and `ball` are one list or record, so changing it through `other` changes it through `ball` too. If you wanted a separate one, copy it where it is made.

Write:  other = copy ball

I cannot find the library `stars`

use "stars"circle at 1 1 radius 2
── I cannot find the library `stars` ─────────────────── sketch.roci:1:1

1 │ use "stars"
  │ ^^^^^^^^^^^

`use "stars"` reads the library from the libs folder of this sketch, and there is no folder `libs/stars` with it. `roci get` puts a library there.

In a terminal, in the folder of this sketch:  roci get stars

I cannot work this out

w = "a" - 1
── I cannot work this out ────────────────────────────── sketch.roci:1:5

1 │ w = "a" - 1
  │     ^^^^^^^

`-` does not work with text and a number. Numbers go with numbers, vectors with vectors of the same size or with a number, and text joins with anything using plus.

Write:  w = 1 - 1

I did not expect this here

circle at 100 100 radius 50 60
── I did not expect this here ───────────────────────── sketch.roci:1:29

1 │ circle at 100 100 radius 50 60
  │                             ^^

A line holds one statement, and `60` comes after a complete one. Put it on its own line, or inside a one-line block separate statements with two spaces.

On two lines:
    circle at 100 100 radius 50
    60

I don't know the escape `\q`

title "a\qb"
── I don't know the escape `\q` ──────────────────────── sketch.roci:1:9

1 │ title "a\qb"
  │         ^^

Inside text a backslash starts an escape. I know a quote (backslash and a quote), a backslash (two of them), a new line (backslash n) and a tab (backslash t).

To write the backslash itself:  title "a\\qb"

I don't know the event `kee`

on kee "space" [  circle at 100 100 radius 50]
── I don't know the event `kee` ──────────────────────── sketch.roci:1:4

1 │ on kee "space" [
  │    ^^^

`on` runs a block when something happens. The events I know are key, mouse down, mouse up, touch down, touch up, resize, move, focus.

Did you mean:  on key "space" [

I don't know the name `zzz`

circle at zzz 100 radius 50
── I don't know the name `zzz` ──────────────────────── sketch.roci:1:11

1 │ circle at zzz 100 radius 50
  │           ^^^

`zzz` is not a name you have given a value, and it is not a verb or a built-in value either. Give it a value first.

Give it a value first:
    zzz = 0
    circle at zzz 100 radius 50

I don't know the word `circel`

circel 100 100 50
── I don't know the word `circel` ────────────────────── sketch.roci:1:1

1 │ circel 100 100 50
  │ ^^^^^^

A line starts with a verb, a keyword or a name, and I don't know `circel`. Check the spelling, or teach the word with `learn`.

Did you mean:  circle 100 100 50

I don't know this character

circle at 100 100 radius 50 ;
── I don't know this character ──────────────────────── sketch.roci:1:29

1 │ circle at 100 100 radius 50 ;
  │                             ^

`;` is not part of the language. Words are made of letters, numbers of digits, and two slashes start a comment.

Without it:  circle at 100 100 radius 50

Items in curly brackets are separated by commas

p = { 10 20 }
── Items in curly brackets are separated by commas ──── sketch.roci:1:10

1 │ p = { 10 20 }
  │          ^^

Between the items of a vector or a record goes a comma.

Write:  p = { 10, 20 }

Lists have no commas

scores = [ 10, 20, 30 ]
── Lists have no commas ─────────────────────────────── sketch.roci:1:14

1 │ scores = [ 10, 20, 30 ]
  │              ^

The items of a list are written with spaces between them. Commas belong to vectors and records, which use curly brackets.

Write:  scores = [ 10 20 30 ]

No record like this has `vell`

ball = { pos: { 1, 2 }, vel: { 3, 4 } }x = ball.vell
── No record like this has `vell` ───────────────────── sketch.roci:2:10

2 │ x = ball.vell
  │          ^^^^

This is a record with pos and vel. It has no field called `vell`, and no line of the sketch gives it one. The fields it has are pos and vel.

Did you mean:  x = ball.vel

Nothing after the equals sign

x =
── Nothing after the equals sign ─────────────────────── sketch.roci:1:3

1 │ x =
  │   ^

An equals sign gives a name a value, so a value has to follow it.

For example:  x = 10

Teach a new word with learn

to star size [  repeat 5 [ forward size  right 144 ]]
── Teach a new word with learn ───────────────────────── sketch.roci:1:1

1 │ to star size [
  │ ^^

rocinante does not use `to` for teaching a verb. Teach one with `learn`, then the new word, then what it takes.

Write:  learn star size [

The block of `keep` has to give true or false

ps = [ { 1, 2 } ]alive = keep ps [ it.x ]
── The block of `keep` has to give true or false ────── sketch.roci:2:19

2 │ alive = keep ps [ it.x ]
  │                   ^^^^

Here it gives a number.

Write:  alive = keep ps [ it.x > 0 ]

There is no item 4 in `scores`

scores = [ 10 20 30 ]last = item 4 of scorescircle at 100 100 radius last
── There is no item 4 in `scores` ────────────────────── sketch.roci:2:8

2 │ last = item 4 of scores
  │        ^^^^^^^^^^^^^^^^

`scores` has 3 items in it, so item 4 is not there. Items are numbered from 1, and the sketch carries on with an empty value. Check the count first.

Check first:  if count scores >= 4 [ last = item 4 of scores ]

This block is never closed

repeat 3 [  circle at 100 100 radius 50  circle at 200 200 radius 50
── This block is never closed ───────────────────────── sketch.roci:1:10

1 │ repeat 3 [
  │          ^

The opening square bracket here has no closing one. Add the closing square bracket after the last line of the block, line 3.

Write:
    repeat 3 [
      circle at 100 100 radius 50
      circle at 200 200 radius 50
    ]

This closing round bracket has no opening one

circle at 100 100 radius 50 )
── This closing round bracket has no opening one ────── sketch.roci:1:29

1 │ circle at 100 100 radius 50 )
  │                             ^

Nothing is open here, so there is nothing to close.

Without it:  circle at 100 100 radius 50

This curly bracket is never closed

p = { 10, 20
── This curly bracket is never closed ────────────────── sketch.roci:1:5

1 │ p = { 10, 20
  │     ^

The opening curly bracket here has no closing one. A vector or a record ends with a closing curly bracket.

Write:  p = { 10, 20 }

This divides by zero

columns = 0wide = 600 / columnscircle at 100 100 radius 50
── This divides by zero ──────────────────────────────── sketch.roci:2:8

2 │ wide = 600 / columns
  │        ^^^^^^^^^^^^^

The number you divide by is 0 here, and nothing can be divided by 0. The sketch carries on with 0 as the answer. Check the number first.

Check first:  if columns is not 0 [ wide = 600 / columns ]

This for is missing `from`

for i 1 to 10 [  circle at (i * 10) 100 radius 5]
── This for is missing `from` ────────────────────────── sketch.roci:1:7

1 │ for i 1 to 10 [
  │       ^

A counting loop reads `for i from 1 to 10`, and a loop over a list reads `for each p in particles`.

Write:  for i from 1 to 10 [

This round bracket is never closed

circle at (random width 100 radius 50
── This round bracket is never closed ───────────────── sketch.roci:1:11

1 │ circle at (random width 100 radius 50
  │           ^

The opening round bracket here has no closing one. Round brackets make a group read as one thing, so each needs its closing bracket.

Write:  circle at (random width 100 radius 50)

This text never closes

title "hello
── This text never closes ────────────────────────────── sketch.roci:1:7

1 │ title "hello
  │       ^^^^^^

Text starts and ends with a double quote, and it has to end on the same line.

Write:  title "hello"

This took too long

count_up = 0while true [  count_up = count_up + 1]circle at 100 100 radius 50
── This took too long ────────────────────────────────── sketch.roci:2:1

2 │ while true [
  │ ^^^^^^^^^^^^

The sketch spent more than 0.05 seconds on one frame, so it was stopped and the last good frame stays on screen. A loop that never ends, or one that is far too big, does this.

Make it smaller:  repeat 100 [ ... ]

This value needs brackets

x = 1circle at x + 1 100 radius 50
── This value needs brackets ────────────────────────── sketch.roci:2:11

2 │ circle at x + 1 100 radius 50
  │           ^^^^^

`x + 1` works out a value, so when it sits inside another call, wrap it in round brackets so it reads as one thing. Or let `roci fmt` add them for you.

Write:  circle at (x + 1) 100 radius 50

Two values side by side

x = 5y = x -10
── Two values side by side ───────────────────────────── sketch.roci:2:7

2 │ y = x -10
  │       ^^^

`-10` follows a value with nothing between them. If you meant to subtract, put a space after the minus sign.

Write:  x - 10

Warning: `Speed` and `speed` differ only in capitals

speed = 1Speed = 2
── Warning: `Speed` and `speed` differ only in capitals ─── sketch.roci:2:1

2 │ Speed = 2
  │ ^^^^^

They are two different names, which is almost always a typo. If you meant the same one, spell it the same way.

Write:  speed = 2

Warning: `double` gives a value back, and nothing uses it

learn double n [ give n * 2 ]double 21
── Warning: `double` gives a value back, and nothing uses it ─── sketch.roci:2:1

2 │ double 21
  │ ^^^^^^^^^

This line calls `double` and throws its result away, which is usually a mistake. Keep the value in a name.

Write:  answer = double 21

Warning: `size` hides a name of the sketch

size = 10learn star size [  circle at 100 100 radius size]star 50
── Warning: `size` hides a name of the sketch ───────── sketch.roci:2:12

2 │ learn star size [
  │            ^^^^

`size` is also a name you give a value to at the top of the sketch. In here, `size` means this one, and the other cannot be reached. A different name avoids mixing the two up.

Write:  learn star size2 [

Warning: `width` could be read two ways

photo = 1picture photo width 200
── Warning: `width` could be read two ways ──────────── sketch.roci:2:15

2 │ picture photo width 200
  │               ^^^^^

Here `width` is read as a connecting word. If you meant the value called `width`, put it in round brackets.

To mean the value:  picture photo (width) 200

`#ff880` has the wrong number of digits for a color

fill #ff880
── `#ff880` has the wrong number of digits for a color ─── sketch.roci:1:6

1 │ fill #ff880
  │      ^^^^^^

A color written with a hash has 3, 4, 6 or 8 hex digits: red, green and blue, and transparency last.

Write:  fill #ff8800

`1e3` is not a number I can read

circle at 1e3 100 radius 50
── `1e3` is not a number I can read ─────────────────── sketch.roci:1:11

1 │ circle at 1e3 100 radius 50
  │           ^^^

A number is digits with an optional fraction, like 10 or 0.5. Write the zero before the point, and leave out exponents and underscores.

Write:  circle at 1000 100 radius 50

`COLORS` is a constant

COLORS = [ red teal ]add green to COLORS
── `COLORS` is a constant ───────────────────────────── sketch.roci:2:14

2 │ add green to COLORS
  │              ^^^^^^

`COLORS` is written in capitals, so it is a constant: it is given a value once and can never change. If it has to change, write it in lowercase.

Write:  add green to colors

`add` needs the same kind of item as the list

scores = [ 10 20 30 ]add "ten" to scores
── `add` needs the same kind of item as the list ─────── sketch.roci:2:5

2 │ add "ten" to scores
  │     ^^^^^

The list holds a number, but this line gives `add` text. A list holds one kind of item.

Write:  add 1 to scores

`as` does not know the word `centre`

rect at 10 10 size 50 30 as centre
── `as` does not know the word `centre` ─────────────── sketch.roci:1:29

1 │ rect at 10 10 size 50 30 as centre
  │                             ^^^^^^

After `as` comes one of these words: `center` or `corner`.

Did you mean:  rect at 10 10 size 50 30 as center

`b` has no value yet

a = bb = 1
── `b` has no value yet ──────────────────────────────── sketch.roci:1:5

1 │ a = b
  │     ^

`b` is given its value further down the sketch, but this line runs first, so it has nothing to use. Give it a value above this line.

Write:
    b = 0
    a = b

`cast` needs a shape here

walls = [ { from: { 0, 0 }, to: { 400, 0 } } ]h = cast { pos: { 0, 0 }, radius: 4 } walls
── `cast` needs a shape here ────────────────────────── sketch.roci:2:10

2 │ h = cast { pos: { 0, 0 }, radius: 4 } walls
  │          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This is a record with pos and radius. A line to cast is a record made with `from` and `to`. A shape is a vector, which is a point, or a record with `pos` and `radius` for a circle, `pos` and `size` for a rectangle, with `angle` to turn it, `from` and `to` for a line, or `points` for any outline.

For example:  h = cast { from: { 0, 0 }, to: mouse } walls

`circle` is already a word

circle = 3
── `circle` is already a word ────────────────────────── sketch.roci:1:1

1 │ circle = 3
  │ ^^^^^^

The language already uses `circle` for something else, so it cannot be the name of a value. Pick another name.

Write:  mycircle = 3

`circle` is already a word

learn circle size [  circle at 100 100 radius size]
── `circle` is already a word ────────────────────────── sketch.roci:1:7

1 │ learn circle size [
  │       ^^^^^^

The language already uses `circle`, so it cannot be taught or used as a name here. Pick another one.

Write:  learn mycircle size [

`circle` is written with labels

circle 100 100 50 fill red
── `circle` is written with labels ───────────────────── sketch.roci:1:1

1 │ circle 100 100 50 fill red
  │ ^^^^^^^^^^^^^^^^^^^^^^^^^^

Shapes are written with the words at and radius in front of their values, so a number is never mistaken for another and the line reads as what it draws.

Write:  circle at 100 100 radius 50 fill red

`clear` does not give a value back

x = clear
── `clear` does not give a value back ────────────────── sketch.roci:1:5

1 │ x = clear
  │     ^^^^^

`clear` draws or changes something, but it has nothing to hand back, so it cannot be used as a value. Use it on a line of its own.

Write:  clear

`dx` appears twice

learn move_by dx dx [  move dx dx]
── `dx` appears twice ───────────────────────────────── sketch.roci:1:18

1 │ learn move_by dx dx [
  │                  ^^

Each thing a verb takes needs its own name.

Write:  learn move_by dx dx2 [

`fill` is used twice

circle at 1 2 radius 3 fill red fill blue
── `fill` is used twice ─────────────────────────────── sketch.roci:1:33

1 │ circle at 1 2 radius 3 fill red fill blue
  │                                 ^^^^^^^^^

A call takes each connecting word once. The second `fill` is not needed.

Write:  circle at 1 2 radius 3 fill red

`finger` only works inside on touch down or on touch up

draw [  circle at finger.pos radius 20]
── `finger` only works inside on touch down or on touch up ─── sketch.roci:2:13

2 │   circle at finger.pos radius 20
  │             ^^^^^^^^^^

`finger` is the finger that has just gone down or come up, so it means something only in the block of `on touch down` or `on touch up`. Everywhere else, `touches` holds every finger on the screen now.

For example:  on touch down [ circle at finger.pos radius 20 ]

`it` only works inside a list verb

x = it.life * 2
── `it` only works inside a list verb ────────────────── sketch.roci:1:5

1 │ x = it.life * 2
  │     ^^^^^^^

`it` stands for the current item (or the running value) inside the block of keep, skip, collect, find, sort or combine. It has no meaning anywhere else.

For example:  kept = collect list [ it.life ]

`mix` takes 3 values (first, second and amount) or 3 values (first, second and amount)

x = mix 1 2
── `mix` takes 3 values (first, second and amount) or 3 values (first, second and amount) ─── sketch.roci:1:5

1 │ x = mix 1 2
  │     ^^^^^^^

This line gives `mix` 2 values.

For example:  x = mix 1 2 amount

`of` belongs inside the brackets

colors = [ red teal ]rect at 0 0 size 10 10 fill (item 1) of colors
── `of` belongs inside the brackets ─────────────────── sketch.roci:2:38

2 │ rect at 0 0 size 10 10 fill (item 1) of colors
  │                                      ^^

`of` goes with the call in the round brackets before it, so it is written inside them, before the closing round bracket.

Write:  rect at 0 0 size 10 10 fill (item 1 of colors)

`particles` changes while the loop walks it

particles = []for each p in particles [  add p to particles]
── `particles` changes while the loop walks it ──────── sketch.roci:3:12

3 │   add p to particles
  │            ^^^^^^^^^

A `for each` is going through `particles` right now, and adding to it, taking from it or giving it a new value in the middle makes the walk lose its place. Walk a copy, then change the list.

Write:
    particles_copy = copy particles
    for each item in particles_copy [ ... ]

`pick_one` gives two kinds of value

learn pick_one n [  if n < 0 [ give 1 ] else [ give "a" ]]x = pick_one 5
── `pick_one` gives two kinds of value ──────────────── sketch.roci:2:35

2 │   if n < 0 [ give 1 ] else [ give "a" ]
  │                                   ^^^

An earlier `give` in `pick_one` hands back a number, but this one hands back text. A verb gives one kind of value, and several results come back as a record.

Write:  if n < 0 [ give 1 ] else [ give 1 ]

`random` needs `to`

x = random from 1
── `random` needs `to` ───────────────────────────────── sketch.roci:1:5

1 │ x = random from 1
  │     ^^^^^^^^^^^^^

`random` is not complete without its `to` part.

Write:  x = random from 1 to 0

`random` needs a number for `limit`

colors = [ red teal ]background (random colors)
── `random` needs a number for `limit` ──────────────── sketch.roci:2:20

2 │ background (random colors)
  │                    ^^^^^^

Here it is given a list of colors.

Write:  background (pick colors)

`repeat` needs a block

repeat 4 circle at 100 100 radius 50
── `repeat` needs a block ───────────────────────────── sketch.roci:1:10

1 │ repeat 4 circle at 100 100 radius 50
  │          ^^^^^^

After `repeat` comes a block in square brackets: everything inside it belongs to the `repeat`.

With a block:
    repeat 4 [
      circle at 100 100 radius 50
    ]

`repeat` needs a number here

repeat "x" [  circle at 100 100 radius 50]
── `repeat` needs a number here ──────────────────────── sketch.roci:1:8

1 │ repeat "x" [
  │        ^^^

Here it is given text.

Write:  repeat 1 [

`sign` does not always give a value back

learn sign n [  if n < 0 [ give -1 ]]x = sign 5
── `sign` does not always give a value back ──────────── sketch.roci:1:1

1 │ learn sign n [
  │ ^^^^^^^^^^^^^^

`sign` gives a value on some paths, but one path reaches the end without a `give`. A verb that gives has to give on every path, so add a `give` there too.

Write:
    learn sign n [
      ...
      give 1
    ]

`spin` calls itself too many times

learn spin n [  give 1 + (spin (n + 1))]turns = spin 1circle at 100 100 radius 50
── `spin` calls itself too many times ───────────────── sketch.roci:2:12

2 │   give 1 + (spin (n + 1))
  │            ^^^^^^^^^^^^^^

`spin` went 100 calls deep without finishing, so it was stopped. A verb that calls itself needs a way to stop, a test that ends the calls.

Add a way out:  if n < 20 [ give 1 + (spin (n + 1)) ]

`star` has no word `pionts`. Did you mean `points`?

learn star size with points 5 [  repeat points [ circle at 1 1 radius size ]]star 100 pionts 7
── `star` has no word `pionts`. Did you mean `points`? ─── sketch.roci:4:10

4 │ star 100 pionts 7
  │          ^^^^^^

`star` does not take a word `pionts` after its values, and `points` is the one that is nearest or means the same.

Written with `points`:  star 100 points 7

`tint` changes what `PALETTE` holds

learn tint p [ p.red = 255 ]PALETTE = { red: 0 }tint PALETTE
── `tint` changes what `PALETTE` holds ───────────────── sketch.roci:3:6

3 │ tint PALETTE
  │      ^^^^^^^

`PALETTE` is written in capitals, so it is a constant and can never change, but `tint` changes the list or record it is given. Give it a copy instead.

Write:  tint (copy PALETTE)

`title` names the window the code runs in

w = window size 300 200title w "palette"
── `title` names the window the code runs in ─────────── sketch.roci:2:9

2 │ title w "palette"
  │         ^^^^^^^^^

`title` takes only the text and names the window the code runs in. Another window is changed with `set`, then the window, then `title` and the text.

Write:  set w title "palette"

`tween` cannot move `size`

learn swell [  size = 10  tween size to 50 over 1]
── `tween` cannot move `size` ────────────────────────── sketch.roci:3:9

3 │   tween size to 50 over 1
  │         ^^^^

It only lasts while this block runs. A tween moves a number, a vector or a color, a little each frame, so it needs one that lasts: a name of the sketch, or a field of a record.

For example:  tween ball.pos to { 300, 200 } over 1

`use` goes at the top of a file

repeat 2 [ use "stars" ]
── `use` goes at the top of a file ──────────────────── sketch.roci:1:12

1 │ repeat 2 [ use "stars" ]
  │            ^^^

A library is brought in for the whole sketch, so `use` is written on a line of its own, outside every block.

Write:  use "stars"

`x` keeps one kind of value

x = 10x = "ten"
── `x` keeps one kind of value ───────────────────────── sketch.roci:2:1

2 │ x = "ten"
  │ ^

`x` holds a number, set on line 1, but here it is given text. A name keeps one kind of value; use a new name for text.

Write:  x2 = "ten"

`z` is not a part of a vector of 2 numbers

p = mouseq = p.z
── `z` is not a part of a vector of 2 numbers ────────── sketch.roci:2:7

2 │ q = p.z
  │       ^

A vector of 2 numbers has x and y.

Write:  q = p.x

every needs seconds or frames

every 2 [  circle at 100 100 radius 50]
── every needs seconds or frames ─────────────────────── sketch.roci:1:9

1 │ every 2 [
  │         ^

Say what to count: `every 2 seconds`, or `every 10 frames`.

Write:  every 2 seconds [

give only works inside a verb you teach

give 3
── give only works inside a verb you teach ───────────── sketch.roci:1:1

1 │ give 3
  │ ^^^^

`give` hands a value back from a verb taught with `learn`. Outside one there is nothing to hand it back to.

Inside a verb of your own:
    learn name [
      give 3
    ]

learn needs a name

learn
── learn needs a name ────────────────────────────────── sketch.roci:1:1

1 │ learn
  │ ^^^^^

After `learn` comes the new word, then the names of what it takes.

Write:  learn star

rocinante's words are written in lowercase

Circle 100 100 50
── rocinante's words are written in lowercase ────────── sketch.roci:1:1

1 │ Circle 100 100 50
  │ ^^^^^^

`Circle` is written with capitals. Did you mean `circle`?

Did you mean:  circle 100 100 50

stop only works inside a verb you teach

stop
── stop only works inside a verb you teach ───────────── sketch.roci:1:1

1 │ stop
  │ ^^^^

`stop` ends a verb taught with `learn` early. Outside one there is nothing to end.

Inside a verb of your own:
    learn name [
      stop
    ]

use needs a name in quotes

use 3
── use needs a name in quotes ────────────────────────── sketch.roci:1:5

1 │ use 3
  │     ^

Write the name of the library as text.

Write:  use "3"