Issues

Issue #441 invalid

Tables

buss1000
created an issue

I am using Love2d 8.0 I used to use 7.2 and now my code seems to not work. I have this in a function in a different file called blocks.lua {{{ function defineslots s1 = { x=64, y=64, t=0} end }}} in main in a nutshell I have {{{ function love.load() require "blocks" defineslots() end }}}

This give me the error {{{ Syntax error: blocks.lua:2: '(' expected near 's1' }}} Now I know this mean on line 2 I need the ( near s1 but this makes no sense.

Also I have noticed I can not do require "blocks.lua" if I do it will look for it in block/lua.lua? Why is this?

I would give you the whole code but I don't want to give away my source code for my own reasons.

I can not use my program unless there is a way around this or a fix I do not know of.

Sorry for your time.

Comments (3)

  1. Danny Fritz

    .lua is automatically searched for in lua's require. '.'s are used as directory delimiters in Lua.

    You're missing the function parameter declaration.

    function defineslots()
    s1 = { x=64, y=64, t=0}
    end
    
  2. Log in to comment