Hello, so my topic name is not very informative as i don't really know where the problem is...
Anyway, this is my server-side code:
function checkPlayer(playerNick)
local result = mysql_query(handler,"SELECT * FROM users WHERE Name = '"..playerNick.."'")
if( not result) then outputDebugString("MySQL Fail ("..mysql_errno(handler)..") Error:"..mysql_error(handler))
end
if(mysql_num_rows(result) == 0) then
triggerClientEvent("onRegister",getRootElement())
outputDebugString("Should be triggered")
else
row = mysql_fetch_row(result)
end
mysql_free_result(result)
end
addEventHandler("onPlayerConnect",getRootElement(),checkPlayer)
and this is my client-side code:
function registerHandler()
outputDebugString("Function for registering is called")
end
addEvent("onRegister",true)
addEventHandler("onRegister",getRootElement(),registerHandler)
And the string "function for registering is called" isn't printed out.. I did it exactly like in the wiki, and yet i failed somehow...
where is the problem?