You've got several problems there, you are using lower case, but Lua is case-sensitive, you have to write it exactly like it says on the wiki.
So, change "outputchatbox" to "outputChatBox" and "addeventhandler" to "addEventHandler".
You also have a missing end at "gateo" function.
function getPlayerBanSerial ( thePlayer )
assert ( isElement ( thePlayer ) and getElementType ( thePlayer ) == "player", "Bad player element" )
local playerSerial = getPlayerSerial(thePlayer)
if ( thePlayer ) and ( playerSerial ) then
local theBans = xmlNodeGetChildren( banlist )
for i, theNode in ipairs( theBans ) do
local theValue = xmlNodeGetAttribute( theNode, "Serial" )
if ( theValue == tostring(playerSerial) ) then
outputChatBox ( "getPlayerBanSerial: value of theValue is: ".. tostring ( theValue ) )
return theValue
else
outputChatBox ( "getPlayerBanSerial: theValue doesn't match" )
return false
end
end
end
end
Use that and see what it outputs to the chatbox when you use the command.