hey everyone I have been working on setting up a server using this gamemode. Im running into a few issues that I am not to sure about. the first issue I would like to work through would be the advertisements system. I have the server up and running, registration is okay, character saves are okay so i know the sql is working. but i think its missing a table or something. here is the code its referring to
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
function openAdvertisements( player, command )
local advertisements = { } --These will hold our advertisements to send to the client and populate our advertisement tables.
if not player then player = source end
--Fetch all of the advertisements from the database
for _, ad in ipairs( exports.mysql:select('advertisements') ) do
if tonumber( ad.expiry ) >= tonumber( getRealTime().timestamp ) then --Check if the advertisement has expired, delete it if so.
ad.author = exports.mysql:select_one( "characters", { id = ad.created_by } ).charactername
table.insert( advertisements, ad )
else
deleteAdvertisement( ad.id )
end
end
triggerClientEvent( player, resourceName .. ":display_all", root, advertisements, exports.integration:isPlayerAdmin( player ) ) --Send the advertisements to the client to create the GUI.
end
addCommandHandler( "advertisements", openAdvertisements, false, false )
addCommandHandler( "ads", openAdvertisements, false, false )
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
the error message i am getting is
[2016-07-05 20:36:03] ERROR: advertisements\advertisements.lua:117: call: failed to call 'mysql:select' [string "?"]
[2016-07-05 20:36:03] ERROR: advertisements\advertisements.lua:117: bad argument #1 to 'ipairs' (table expected, got boolean)
Im usually always on and also have skype if you wouldn't mind helping me or maybe your working on one too and might want to work together. My server will be hosted west coast California area and english based place for strong RP and honest nice players from across the globe. I have a few people helping currently but none of us know how to script we just know how to kind of read it and edit.