expected near local error
function setNickToAccount
local account = getPlayerAccount(source)
local accountName = getAccountName(account)
setPlayerName(source, accountName)
end
addEventHandler("onPlayerLogin", getRootElement(), setNickToAccount)
addEventHandler("onPlayerChangeNick", getRootElement(),
function()
cancelEvent();
end
);
also it is whole the code