Jump to content

item-system isnt working


Recommended Posts

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)

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...