- Joined
- Jul 7, 2007
- Messages
- 4,049
- Reaction score
- 239
Hello ^^
I have a problem when executing a SQL Query from a LUA script, it won't show any error, it just won't work.
Script:
Result:
whats the problem in here?
IMAGE

I have a problem when executing a SQL Query from a LUA script, it won't show any error, it just won't work.
Script:
Code:
function onSay(cid, words, param)
local exp = databaseQuery("SELECT `experience` FROM `players` WHERE `name` ='" .. getPlayerName(cid) .. "'")
doPlayerSendTextMessage(cid, 24, "You have " .. exp .. " exp.")
return TRUE
end
Result:
22:10 You have 1 exp.
22:10 GOD Quetzalma [201]: checkexp
22:10 You have 2 exp.
22:10 GOD Quetzalma [201]: checkexp
22:10 You have 3 exp.
22:10 GOD Quetzalma [201]: checkexp
22:10 You have 4 exp.
22:10 GOD Quetzalma [201]: checkexp
22:10 You have 5 exp.
22:10 GOD Quetzalma [201]: checkexp
whats the problem in here?
IMAGE

Last edited: