MaRr03 Posted May 16, 2020 Share Posted May 16, 2020 (edited) Hello, can you help me? Error message: ERROR: advertisements\advertisements.Lua:39: call: failed to call 'mysql:insert' [string "?"] function( phone, name, address, advertisement, expires, created_by, section ) if not ( phone == nil or name == nil or address == nil or advertisement == nil ) then local createdBy = tostring( getElementData( source, "dbid" ) ) local start = getRealTime().timestamp local expiry = start + expires THERE IS LINE 39 - if exports.mysql:insert( 'advertisements', { phone = phone, name = name, address = address, advertisement = advertisement, start = start, expiry = expiry, created_by = createdBy, section = section } ) then else outputChatBox( "SQL Error.", source ) triggerClientEvent( source, resourceName .. ":ad_create_fail", root ) end else outputChatBox( "Field Error.", source ) triggerClientEvent( source, resourceName .. ":ad_create_fail", root ) end end ) Edited May 16, 2020 by Patrick codeblock Link to comment
Motar2k Posted May 16, 2020 Share Posted May 16, 2020 Apparently you call the function but some error occurs, verify that the arguments you send to the function "mysql: insert" function are correct 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