Skip to content
This repository was archived by the owner on Oct 31, 2022. It is now read-only.
This repository was archived by the owner on Oct 31, 2022. It is now read-only.

I Got It Working, But Found A Potential Freeze With Invalid Lua #6

@ghost

Description

I don't know what I did to get the module to work (probably the part where I renamed the gdns file to LuaScript.gdns instead of just Lua.gdns). This is aside from my merging the latest commit of Godot 3.2-dev with my copy of Godot (which fixed a freeze on all GDNativeLibraries).

However, I noticed loading an invalid Lua file freezes the game as a whole.

Trying to load this file causes the freeze.

local class = require 'lua.class' -- Import the system class library
godot.Node = require 'godot.Node' -- Make sure to import the base class


local NewScript = class.extends(godot.Node) -- Create the user subclass

function NewScript:_ready()
	print("Hello Lua")
end

function NewScript:_process(delta)

end

function NewScript:command(variable)
	return "Variable: %s" % variable
end

function NewScript:get_class()
	return "Test Lua"
end

return NewScript

This file works fine.

function sum(...)
    result = 0
    local arg = {...}
    for i,v in ipairs(arg) do
       result = result + v
    end
    return result
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions