Help with a syntax error please

I am just testing and learning Lua and I came up with a very simple function, but I am getting an error. I would appreciate some help and here’s my code:


local money == 500 

function Bank (customer, money, ammount, give)
	if customer:IsPlayer() then
		print("You have a bank account!")
		then
			give money
		end
	end
end


“give money”
what?

What are you trying to do exactly?

I am just trying to test things, I am learning and sometimes I like to make random things, but I am getting an error, this error to be exact http://puu.sh/2dbas

== compares two values. for example:
if ent:GetClass() == player then
ent:ChatPrint(“Hello, you are a player!”)
end

This compares the entities class to “player” (the class for a player entity). If it returns true, it says hello to that entity (player)

If you want to set a value, use only one equal sign. Example:
local giveamount = 500
ply:Givemoney(giveamount)

Instead of checking to see in giveamount is equal to 500 (at this point its a nil value, because we havent declared it yet), it is essentially saying: “Hey, I want to make this local value(value that will only work/be callable in this function), and I want it equal to 500”

Thank you for the help, but I am missing an argument it says:
[lua]
local money = 500

function Bank (customer, money, ammount, give)
if customer:IsPlayer() then
print(“You have a bank account!”)
if customer:IsPlayer then
customer:Give(money)
end
end
end
[/lua]

[lua]
local money = 500

function Bank (customer, money, amount, give)
if customer:IsPlayer() then
print(“You have a bank account!”)
// Do what ever you want here
end
end
[/lua]

// Do what ever you want here
is probably

money += amount

in your case.

Thanks for the help, I hate to bother you guys and I also want to say, you’re all really good at what you guys do, I also like the stuff that ollie makes and posts on the WAYWO on thread :3