Easter Egg?

Since when was error(string) a thing? It was always ‘assert(boolean, string)! Did ‘error() came with craft?

@TokOut I see error all the way back to version 1.5, so it’s nothing new. What it’s used for I don’t know because I didn’t find anything in the reference.

@dave1707 as I told above it’s basically error(txt) instead of assert(false, txt)

@TokOut assert and error are both in the current code. Do you have an example of how you’re using error instead of assert.

function setup()
    error("Test")
end

--[[
Main:3: Test
stack traceback:
	[C]: in function 'error'
	Main:3: in function 'setup'

EXPECTED:
Main:3: attempt to call a nil value (global 'error')
stack traceback:
	Main:3: in function 'setup'
]]

So it’s the same as assert.