Jump to content

Help with this code


PrinceRyo

Recommended Posts

Hello my name is PrinceRyo im gonna try to make my script but i have problem with this code and the error is (attempt to call local 'balancess' (a boolean values) check my problem on return balancess('balance')

 

function getsquadBankBalance(squad)
  if squad then
local balancess = exports.DENmysql:querySingle("SELECT * FROM squad_bank WHERE squad_name=?", squad)
if not balancess then 
exports.DENmysql:exec("INSERT INTO squad_bank SET squad_name = ?", squad)  
local balancess = exports.DENmysql:querySingle("SELECT * FROM squad_bank WHERE squad_name=?", squad)
end
     return balancess('balance')
  end
end

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