Jump to content

Aattempt to concatenate a unsigned long long value


ToShuk Marusenko

Recommended Posts

local function OnChat(event, player)

local result = CharDBQuery("SELECT skill FROM character_skills WHERE skill = 171 AND guid = "..player:GetGUID())
       if(result) then
            repeat
                skill = result:GetUInt32(0);
            until not result:NextRow()    
        end

    print (guid)
        
print(skill)
end        

RegisterPlayerEvent(18, OnChat) 


    Eluna: lua_scripts/prod_fix.lua:3: attempt to concatenate a unsigned long long value

 

i have this error, but why?? if i write "3" this code i normal work

Link to comment
Share on other sites

player:GetGUID() does not return a number, it returns an object. To concatenate it to a string you should use tostring(player:GetGUID())

Also using player:GetGUID() is wrong. You should be using player:GetGUIDLow() for any queries into DB with player guid.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use