darkside17 Posted January 23, 2012 Share Posted January 23, 2012 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
Castillo Posted January 23, 2012 Share Posted January 23, 2012 Is "handler" a valid MySQL connection? Link to comment
darkside17 Posted January 23, 2012 Author Share Posted January 23, 2012 i think so its in the rest of the scripts and there working fine, but i couldnt really tell you lol im just trying to set up a server for my brother i cant script. Link to comment
Castillo Posted January 23, 2012 Share Posted January 23, 2012 Well, that error means that the MySQL connection is nil. Link to comment
darkside17 Posted January 23, 2012 Author Share Posted January 23, 2012 hmm, but all the other resources are connected to MySQL, do you know any way i could fix it ? Link to comment
Thelastride Posted January 23, 2012 Share Posted January 23, 2012 This is a stupid question.What you mean by item-system,I have no clue what you need.Its section for scripting help not running unknown gamemodes Link to comment
myonlake Posted January 23, 2012 Share Posted January 23, 2012 He's running mabako's Paradise:MTA gamemode obviously. Link to comment
BriGhtx3 Posted January 23, 2012 Share Posted January 23, 2012 Yeah you can fix it. Just fix the MySQL_Connection >. Link to comment
darkside17 Posted January 23, 2012 Author Share Posted January 23, 2012 its vedic but the guy i bought it from dosent provide any support for the errors he said all the resources work fine. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now