= expected near function?

[LUA][ERROR] gamemodes/seriousrp/gamemode/player.lua:31: unexpected symbol near ‘==’

  1. unknown - gamemodes/seriousrp/gamemode/player.lua:0

Im getting that error ^^ in my player.lua file which i will paste under this:

–> Defining strings (MONEY_STARTAMOUNT, etc.)
MONEY_STARTAMOUNT = 5000

–> Player connecting
function GM:PlayerConnect ( name, ip )
PrintMessage( HUD_PRINTTALK, name… " has joined the game.")
– Print to chat the player connected
end

–> Player disconnecting
function GM:PlayerDisconnected ( name )
– Print to chat the player disconnected
PrintMessage( HUD_PRINTTALK, name… " has left the game.")
print(“You have connected and your money has been saved to SQLLite and TXT.”)
name:SaveMoney()
name:SaveMoneyTXT()

end

–> Players first spawn
function GM:PlayerInitialSpawn( ply )
–> Stripping players and giving them the default job (Citizen)

ply:StripWeapons()
ply:SetTeam( 1 )


--> Giving players starting money, giving players their money.

local cash == ply:GetPData("money") -- Get the saved money amount

if cash == nil then -- If a player never joined the server or doesn't have any money.
	ply:SetPData("money", MONEY_STARTAMOUNT) -- Save the starting money to the players account.
	ply:SetMoney( MONEY_STARTAMOUNT ) -- Set the players money to starting money-
else
	ply:SetMoney( cash ) -- if the player has joined the server and have got saved cash, then give him the cash.
end

end

–> Players spawn (suiciding, dieing, etc)
function GM:PlayerSpawn( ply )
ply:StripWeapons()

	if ply:Team() == 1 then
	ply:Give( "weapon_physgun" )
	ply:Give( "weapon_physcannon" )
	elseif ply:Team() == 2 then
		ply:Give( "weapon_physgun" )
		ply:Give( "weapon_physcannon" )
		ply:Give( "weapon_fas_colt1911" )
end

end[/LUA]

Use [noparse]




[/noparse] tags…

Change


local cash == ply:GetPData("money")

to


local cash = ply:GetPData("money")

[noparse][LUA][/LUA][/noparse] has syntax highlighting, use that instead, I used code tags only before I knew about lua tags…

Thanks