Why does this not work

i have not idea. i am new at this ok :smiley:

[lua]

[ERROR] addons/join and leave message/lua/autorun/server/init.lua:20: bad argument #2 to ‘Exists’ (string expected, got no value)

  1. Exists - [C]:-1
  2. unknown - addons/join and leave message/lua/autorun/server/init.lua:20

if file.Exists(“PlayerData.txt”) then
file.Append(“PlayerData.txt”,PlayersData)
else
file.Write(“PlayerData.txt”,PlayersData)
end

[/lua]

You need to add “DATA” argument to file.Exists.

file.Exists

Thanks m8