hey im trying to get a item-system to work but i keep getting a error in the console for this area of the script. i cant see whats wrong with it, on line 2
if not itemIndex then
local result = mysql_query( handler, "INSERT INTO items (type, owner, itemID, itemValue) VALUES (" .. getType( element ) .. "," .. getID( element ) .. "," .. itemID .. ",'" .. mysql_escape_string(handler, itemValue) .. ",')" )
if result then
itemIndex = mysql_insert_id( handler )
mysql_free_result( result )
here is the error i get in the console
[2012-01-23 02:52:33] ERROR: unzipped\item-system\s_item_management.lua:225: bad argument #1 to 'mysql_escape_string' (mysqlHandler expected, got nil)