View Issue Details

IDProjectCategoryView StatusLast Update
0008516Multi Theft Auto : San AndreasClientpublic2015-03-03 14:12
ReporterarranTuna Assigned Toccw  
Status resolvedResolutionfixed 
Target Version1.5Fixed in Version1.5 
Summary0008516: Lua function errors give no resource or file when compiled

If a script is compiled and there is a warning or error it will usually tell us the resource name and file, which is extremely helpful.

However it seems that this doesn't apply to lua functions like math.floor, string.find, pairs, etc. The error is only "bad argument #1 to floor (number expected, got nil)"

Steps To Reproduce

-- Put this in a compiled script file and run it:

function testErrorOne()
addCommandHandler("testerror1", testErrorOne)

function testErrorTwo()
addEventHandler("onClientPlayerSpawn", root, blah)
addEventHandler("onClientPlayerSpawn", root, blah)
addCommandHandler("testerror2", testErrorTwo)

function blah() end

function testErrorThree()


-- I noticed that it returns resource and file if the error occurs during script start (testErrorThree) :

ERROR: ResourceNameHere/ScriptFileHere.luac (global scope) - bad argument #1 to floor (number expected, got nil)

-- If you do '/testerror1':

bad argument #1 to floor (number expected, got nil)

-- If you do '/testerror2':

ResourceNameHere/SciptFileHere:0 addEventHandler: 'onClientPlayerSpawn' with this function is already handled


TagsNo tags attached.


has duplicate 0008784 closedccw New issues Resource name does not show up in debug. 

Issue History

Date Modified Username Field Change