# code-block-pro/1.27.5/build/shiki/samples/lua.sample

Code Block Pro – Beautiful Syntax Highlighting, version 1.27.5. 19 lines.

- Page: https://pluginprobe.com/plugins/code-block-pro/1.27.5/code/build/shiki/samples/lua.sample
- Raw: https://pluginprobe.com/plugins/code-block-pro/1.27.5/raw/build/shiki/samples/lua.sample
- Modified: 2023-09-03T01:04:34+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/code-block-pro/1.27.5/code/build/shiki/samples/lua.sample#L10-L20`.

```
ball = {
  xpos = 60,
  ypos = 60,

  -- without the colon syntax, must mention self argument explicitly
  move = function(self, newx, newy)
    self.xpos = newx
    self.ypos = newy
  end
}

-- using the colon, ball is passed as self automatically
ball:move(100, 120)

-- using the dot, must pass self explicitly
ball.move(ball, 100, 120)

-- From https://pico-8.fandom.com/wiki/Lua

```
