Zonet
Web Developer
@up
Thanks, and what do you mean ;o
Thanks, and what do you mean ;o
So you mean you're getting namelocked when using it?
doAddNamelock(name[, reason[, action[, comment[, admin]]]])
doRemoveCreature(cid)
Can anybody make this in luaSQL for 0.2?
I think its possible.
function doPlayerSetRedSkullTicks(cid, val)
if type(val) ~= 'number' then
error("luaDoPlayerSetRedSkullTicks: number expected for local 'val' (got " .. type(val) .. ")", 2)
end
if sqlType == "mysql" then
local env = assert(luasql.mysql())
local con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort))
else -- sqlite
local env = assert(luasql.sqlite3())
local con = assert(env:connect(sqliteDatabase))
end
assert(con:execute("UPDATE `players` SET `redskullticks` = " .. math.max(val, 0) .. " WHERE `id` = " .. getPlayerGUID(cid) .. ";"))
con:close()
env:close()
end
So you mean you're getting namelocked when using it?
yep i ask only that would be able to you write something such
omg
Its 10 seconds :/ You only changed one line, so all credits goes to slwakens.
...but its still not working on tfs 0.2 beacouse of "doPlayerSetRedSkullTicks" :|
Try:
PHP:function doPlayerSetRedSkullTicks(cid, val) if type(val) ~= 'number' then error("luaDoPlayerSetRedSkullTicks: number expected for local 'val' (got " .. type(val) .. ")", 2) end if sqlType == "mysql" then local env = assert(luasql.mysql()) local con = assert(env:connect(mysqlDatabase, mysqlUser, mysqlPass, mysqlHost, mysqlPort)) else -- sqlite local env = assert(luasql.sqlite3()) local con = assert(env:connect(sqliteDatabase)) end assert(con:execute("UPDATE `players` SET `redskullticks` = " .. math.max(val, 0) .. " WHERE `id` = " .. getPlayerGUID(cid) .. ";")) con:close() env:close() end
Maybe field name is wrong, tell me if any errors occur... Also in top of your config.lua you need "dofile('config.lua')".
[30/07/2009 06:37:18] Warning: [Event::checkScript] Event onUse not found. /scripts/quests/doll.lua