Fixing a addon. Amenities

Addon: DarkRP Amenities

Pic of config and error:

So I’m trying to use this addon its fresh I have made no changes at all ever to it. ive seen it on other servers and it works fine I’m thinking its maybe made for 2.4 so maybe the command changed… is there anyway to fix this guys if you could help me out that would be awesome.

Is CanAfford defined?

I have no idea… What would it say?

I mean all it says is price…

I have no idea how the code works so I wouldn’t know

instructions state: Using the amenities

  • Walk upto either the health station or vending machine
  • Press e while looking at the entity
  • A small window will pop up, allowing you to purchase full health/armor for ( ( price per health/armor/hunger ) * missing health/armor/hunger )
  • If hungermod is disabled, the vending machine will have a popup notification to let the user know they cannot use it

Wondering maybe * missing has something to do with it.

Two problems I see:

DarkRP uses Lower Camel Case (camelCase), and in that file you are saying ply:CanAfford instead of ply:canAfford (notice capitalization).
Second one is ply:AddMoney should be ply:addMoney

ok cool that fixed the error now they both say 0$ how would I change the price?

there’s a variable named ‘Price’ right there in your screenshot…

local price = 0 I changed it to 300 nothing happened

Apparently there’s also a console command to change the price, by the looks of your script.
Have you changed ‘items_healthcostper1’ and ‘items_armorcostper1’ to something other than 0?

ahh I didn’t know that 1 sec ill give it a try

[editline]29th August 2015[/editline]

Unknown command: items_healthcostper1