Postado Novembro 17, 2017 7 anos Autor 2 minutos atrás, luanluciano93 disse: -- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'") if resultId then repeat local test1 = result.getStream(resultId, "attr") local test2 = result.getString(resultId, "attr") local test3 = tonumber(test1) local test4 = tonumber(test2) if test1 then print(test1) end if test2 then print(test2) end if test3 then print(test3) end if test4 then print(test4) end until not result.next(resultId) end return false end
Postado Novembro 17, 2017 7 anos -- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'") if resultId then repeat local test1 = result.getStream(resultId, "attr") local test2 = result.getString(resultId, "attr") local test3 = tonumber(test1) local test4 = tonumber(test2) if test1 then print("stream: " .. test1 .." / ".. type(test1)) end if test2 then print("string: " .. test2 .." / ".. type(test2)) end if test3 then print("number1: " .. test3 .." / ".. type(test3)) end if test4 then print("number2: " .. test4 .." / ".. type(test4)) end until not result.next(resultId) end return false end STYLLER OT 2022
Postado Novembro 17, 2017 7 anos Autor 3 minutos atrás, luanluciano93 disse: -- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'") if resultId then repeat local test1 = result.getStream(resultId, "attr") local test2 = result.getString(resultId, "attr") local test3 = tonumber(test1) local test4 = tonumber(test2) if test1 then print("stream: " .. test1 .." / ".. type(test1)) end if test2 then print("string: " .. test2 .." / ".. type(test2)) end if test3 then print("number1: " .. test3 .." / ".. type(test3)) end if test4 then print("number2: " .. test4 .." / ".. type(test4)) end until not result.next(resultId) end return false end
Postado Novembro 17, 2017 7 anos -- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'") if resultId then repeat local test1 = result.getStream(resultId, "attr") -- retorn string if test1 then local test = string.sub(test1, 25, 34) print(test) if tonumber(test) then print("number: ".. test) end end until not result.next(resultId) end return false end STYLLER OT 2022
Postado Novembro 17, 2017 7 anos Autor 4 minutos atrás, luanluciano93 disse: -- <talkaction words="!test" script="teste.lua" /> function onSay(player, words, param) local resultId = db.storeQuery("SELECT `player_id`,`pid`,`sid`,CONVERT(`attributes` USING latin1) AS `attr` FROM `player_items` WHERE CONVERT(`attributes` USING latin1) LIKE '%timerOnExp%'") if resultId then repeat local test1 = result.getStream(resultId, "attr") -- retorn string if test1 then local test = string.sub(test1, 25, 34) print(test) if tonumber(test) then print("number: ".. test) end end until not result.next(resultId) end return false end
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.