Hello . I have a problem with this script and basically threw everything works but does not give credit to the console pops up the error
[ Error - CreatureScript Interface] data / creature / scripts / points.lua : onLogin description: ( luaGetCreatureName ) Creature not found
function onLogin(cid
)
local gstorage = getGlobalStorageValue(1750)
local name = getCreatureName(cid)
if getPlayerStorageValue(cid,2387) < 1 then
if (gstorage < 21) then
setGlobalStorageValue(1750, gstorage + 1)
doPlayerSetStorageValue(cid,2387, 1)
local gstorage2 = getGlobalStorageValue(1750)
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. 8 .. " WHERE `name` = '" .. getAccountByName(getCreatureName(name)) .. "' LIMIT 1;")
doBroadcastMessage("Gracz " .. name .. " zalogowal sie jako " .. gstorage2 .. " osoba! Jest w pierwszej 20 wiec dostaje 8 punktow do sms shopa! Gratulacje!")
end
end
return true
end
[ Error - CreatureScript Interface] data / creature / scripts / points.lua : onLogin description: ( luaGetCreatureName ) Creature not found
function onLogin(cid
)
local gstorage = getGlobalStorageValue(1750)
local name = getCreatureName(cid)
if getPlayerStorageValue(cid,2387) < 1 then
if (gstorage < 21) then
setGlobalStorageValue(1750, gstorage + 1)
doPlayerSetStorageValue(cid,2387, 1)
local gstorage2 = getGlobalStorageValue(1750)
db.executeQuery("UPDATE `accounts` SET `premium_points` = `premium_points` + " .. 8 .. " WHERE `name` = '" .. getAccountByName(getCreatureName(name)) .. "' LIMIT 1;")
doBroadcastMessage("Gracz " .. name .. " zalogowal sie jako " .. gstorage2 .. " osoba! Jest w pierwszej 20 wiec dostaje 8 punktow do sms shopa! Gratulacje!")
end
end
return true
end
Last edited by a moderator: