Whats wrong with this script?

So ive decided to try out the “Applejack” from ventmob, and i wanted to create a moneypack command, witch goes like this
cider.command.add(“moneypck”,“b”,1,function(ply, target)
local victim = player.Get(target);
if (victim) then
victim.Givemoney (50000)
return false, “Invalid player '”…target…"’!";
end, “Admin Commands”, “<player>”, “Give a moneypack”, true);

But its broken at the : Victim.givemoney, saying the command dosent exist.

So you guys got any idea?

Well, I dont know much about that gamemode but im guessing it’d be

a . and : are 2 totally different things

Ill try the other one :wink:

[editline]17th February 2012[/editline]

Still saying “unknow command “givemoney”” ^^, but its used alot of the other places in the mod.

Copy and paste the whole error please.

14:08:23 callback for “cider moneypck speedy” failed: [gamemodes\applejack\gamemode \sv_commands.lua:1114 attemp to call method “givemoney” <a nil value>

I too know nothing of this gamemode, but it looks like the server isn’t registering the command “givemoney” onto the player metatable. Do you know where the code for that is? I would say this problem is not necessarily with the script clip you posted, but perhaps with code in another lua file?

Well are you sure its not something like “GiveMoney”?

Yeah, it’s GiveMoney for sure, also made such a command a while back (;

Find GiveMoney() and try posting it here.

Well its working for cider, but ive found another command, “giveitem name dollar”, so now ive just need a command to remove money, but ill think i can easily fix that, else thanks for your help