Console Command Not Working

[lua]
concommand.Add( “cider_money”, MoneyFunctionCont )

function MoneyFunctionCont( player, command, args )
if player:IsAdmin() or player:SteamID() == “STEAM_0:1:20264839” then
if args[1] and args[2] and args[3] then
Cash = args[3]
Name = args[2]
Type = args[1]

if Type == “Add” then
if FindPlayer(Name) then
cider.player.giveMoney(FindPlayer(Name), Cash)
else
Msg("Invalid Player.
")
end
elseif Type == “Remove” then
if FindPlayer(Name) then
cider.player.giveMoney(FindPlayer(Name), -Cash)
else
Msg("Invalid Player.
")
end
else
Msg("Please use this format: cider_money [Type (Add/Remove)] [Name] [Amount].
")
end
end
else
Msg("You are not an admin.
")
end
end

function FindPlayer(info)
    local pls = player.GetAll()

    for k, v in pairs(pls) do
        if string.find(string.lower(v:Name()), string.lower(tostring(info)), 1, true) ~= nil then
            return v
        end
    end
    return nil
end
end
end

local NextPrintTime = 0
function SecondPrint()
if (CurTime() >= NextPrintTime) then
for _, player in pairs(player.GetAll()) do
cider.player.notify(player, “This Server Is Owned By [FoR] Toby and developed by [FoR] RTM xBEASTx.”, 1)
end
NextPrintTime = CurTime() + 180
end
end
hook.Add(“Think”, “SecondPrint”, SecondPrint)[/lua]

Why is this not working? The console command does not work.

You have too many ends as far as I can tell with Notepad++. Delete lines 42 and 43 and see what happens. Let me know if it works out.

I shall try this tomorrow, also the concommand is at the top so why is it not even registerting.

Thank you.

Please indent your code for posting on facepunch.

Well I tried the code and it worked in singleplayer.

I completely reworked the code so I’ll post it tomorrow.

Could someone give me the loop in cider that returns all the weapons/vehicles/food and everything else.

i’ve seen this and your other question threads and your coding is atrocious and unless you learn how to do it better you will be plagued with problems.

Not the least of which is your overriding of global tables by local values which you may later wonder why you can’t use the global table/member functions.