Jump to content

[HELP] error


MaRr03

Recommended Posts

Posted (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 by Patrick
codeblock
Posted

Apparently you call the function but some error occurs, verify that the arguments you send to the function "mysql: insert" function are correct

My discord: Armisael_#1719

 Did my help work for you? Don't forget to thank 

¿Mi ayuda funcionó para ti? No olvides agradecer

How give thanks

 

 

 

 

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...