Hello,
i have problems with my small code here:
local CATEGORY_NAME = "DarkCMDs"
ulx.moneycount = {}
function updateMoney()
table.Empty(ulx.moneycount)
table.insert(ulx.moneycount,"10")
table.insert(ulx.moneycount,"20")
table.insert(ulx.moneycount,"30")
table.insert(ulx.moneycount,"40")
end
hook.Add( ULib.HOOK_UCLCHANGED, "ULXDonatedMoneyUpdate", updateMoney )
updateMoney()
function ulx.donated(target_ply, moneycount)
if moneycount == "10" then
RunConsoleCommand("ulx", "adduser" target_ply "donator")
RunConsoleCommand("ps2_addpoints", target_ply:SteamID "points" "10000000")
RunConsoleCommand("ps2_addpoints", target_ply:SteamID "premiumPoints" "350000")
end
if moneycount == "20" then
RunConsoleCommand("ulx", "adduser" target_ply "donator")
RunConsoleCommand("ps2_addpoints", target_ply:SteamID "points" "30000000")
RunConsoleCommand("ps2_addpoints", target_ply:SteamID "premiumPoints" "1000000")
end
if moneycount == "30" then
RunConsoleCommand("ulx", "adduser" target_ply "donator")
RunConsoleCommand("ps2_addpoints", target_ply:SteamID "points" "60000000")
RunConsoleCommand("ps2_addpoints", target_ply:SteamID "premiumPoints" "3000000")
end
if moneycount == "40" then
RunConsoleCommand("ulx", "adduser" target_ply "donator")
RunConsoleCommand("ps2_addpoints", target_ply:SteamID "points" "100000000")
RunConsoleCommand("ps2_addpoints", target_ply:SteamID "premiumPoints" "6000000")
end
end
local donated = ulx.command(CATEGORY_NAME, "ulx donated", ulx.donated, "!donated", true)
donated:addParam{ type=ULib.cmds.PlayerArg }
force:addParam{ type=ULib.cmds.StringArg, completes=ulx.moneycount, hint="Donated Money" }
donated:defaultAccess( ULib.ACCESS_SUPERADMIN )
donated:help( "Donator add" )
It says:
[ERROR] addons/darkaddon/lua/ulx/modules/sh/darkcmds.lua:113: ')' expected near 'target_ply'
1. unknown - addons/darkaddon/lua/ulx/modules/sh/darkcmds.lua:0
Can you help me with that pls?
Greetings