file.Exists to file.Find

I’ve been trying to figure out this command but the fucker won’t work.
This is what I’ve got so far.

bad argument #2 to ‘Find’ (string expected, got no value)(Hook: PlayerInitialSpawn)
gamemodes/surf/gamemode/init.lua:14


if (file.Find("data/"..ply:EscapedID()..".txt")) then
local money = file.Read("data/"..ply:EscapedID()..".txt")
ply:SetNWInt("money", money)
else
file.Write("data/"..ply:EscapedID()..".txt", 50)
ply:SetNWInt("money", 50)
 end




Those are lines 14-20

Are you using GM13? Read this then.

I read that and yes this if for GM13.

Fill in the second argument for file.Find then.

Old:

file.Find( “settings/server_settings/.txt", true )
file.Find( "my_stuff/
.txt” )
New:

file.Find( “settings/server_settings/.txt", “GAME” )
file.Find( "my_stuff/
.txt”, “DATA” )