Jump to content

MYSQL problem


dugasz1

Recommended Posts

local host = "xy" 
local felhnev = "xy" 
local pw = "xy" 
local database = "xy" 
local pontForInv = 30 
  
local connect = dbConnect( "mysql", "dbname="..database..";host="..host, felhnev, pw, "share=1" ) 
  
function getZpont ( thePlayer ) 
    local accountData = getPlayerAccount(thePlayer) 
    local accName = getAccountName (accountData)     
    if accName == "guest" then 
        triggerClientEvent(thePlayer, "zPontRefresh", getRootElement(), 0) 
    else 
        local query = dbPoll(dbQuery(connect, "SELECT * FROM zshop WHERE accNev='"..accName.."' ;" ),-1) 
        if not(query) then 
            outputDebugString("Query hiba!") 
        else 
            for _,v in pairs(query) do 
                zPontja = v['pont'] 
            end 
            if zPontja then 
                triggerClientEvent(thePlayer, "zPontRefresh", getRootElement(), zPontja) 
                zPontja = nil 
            else 
                triggerClientEvent(thePlayer, "zPontRefresh", getRootElement(), 0) 
                zPontja = nil 
            end 
        end 
    end 
end 

m4um.png

http://img15.imageshack.us/img15/6892/m4um.png

(This is a DayZ server)

I never seen error liek this yet :/ Any idea?

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