kevin11 Posted June 1, 2010 Share Posted June 1, 2010 (edited) i tried making a command !admins that show online admins and, junior-admins but it isnt working it gives this error [02:59:49] SCRIPT ERROR: ...an Andreas/serverrace/mods/deathmatch/resources/online_admins/server.lua:29: 'end' expected (to close 'function' at line 3) near '<eof>' [02:59:49] WARNING: Loading script failed: ...an Andreas/serverrace/mods/deathmatch/resources/online_admins/server.lua:29: 'end' expected (to close 'function' at line 3) near '<eof>' admins = "" function processAdminList() players = getElementsByType ( "player" ) admins = "" for k,v in ipairs(players) do local accountname = "" if (isGuestAccount(getPlayerAccount(v)) == false) then accountname = getAccountName (getPlayerAccount(v)) if isObjectInACLGroup ( "user." .. accountname, aclGetGroup ( "Admin, Junior-admin" ) ) then if (admins == "") then outputChatBox( "Online Admins Are: getPlayerAccount(v)",getRootElement(),0,0,255) else admins = admins .. ", " .. getPlayerName(v) end end end end addEvent("admins", true) addEventHandler( "admins",getRootElement(),processAdminList ) function checkCommand ( message, messageType ) if ( messageType == 0 ) then if ( message == "!admins" ) then setTimer( triggerEvent, 100, 1, "admins", source ) end end end addEventHandler ( "onPlayerChat", getRootElement(), checkCommand ) Edited June 2, 2010 by Guest Link to comment
Callum Posted June 2, 2010 Share Posted June 2, 2010 After line 14 insert a new line and add "end". Link to comment
50p Posted June 2, 2010 Share Posted June 2, 2010 Use MTA:SE to help you with syntax errors. Link to comment
kevin11 Posted June 2, 2010 Author Share Posted June 2, 2010 After line 14 insert a new line and add "end". not working and no errors Link to comment
artek Posted June 2, 2010 Share Posted June 2, 2010 try to do it from scratch could have done something wrong Link to comment
kevin11 Posted June 2, 2010 Author Share Posted June 2, 2010 try to do it from scratch could have done something wrong wut? Link to comment
eAi Posted June 2, 2010 Share Posted June 2, 2010 Well, aclGetGroup ( "Admin, Junior-admin" ) looks wrong to me. Link to comment
kevin11 Posted June 2, 2010 Author Share Posted June 2, 2010 Well, aclGetGroup ( "Admin, Junior-admin" ) looks wrong to me. srry for wasting time nvm aboout this Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now