Forum

> > CS2D > Scripts > hats and save points error
Forums overviewCS2D overview Scripts overviewLog in to reply

English hats and save points error

2 replies
To the start Previous 1 Next To the start

old hats and save points error

jerezinho
User Off Offline

Quote
Hi us guys,

I'm in need of your help, I have an error with these codes, someone who can help me with these mistakes?, I can not find the error.

Hats code error >

Save points error >


IMG:https://i62.servimg.com/u/f62/19/44/27/27/bandic10.jpg


I need to correct these codes, thanks to all

old Re: hats and save points error

Bowlinghead
User Off Offline

Quote
Do you understand the problem?
I guess this fixes it:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
addhook("join","loaddata")
function loaddata(id)
     local loaded = false
     if player(id,"usgn") > 0 then
          local f = io.open("sys/lua/hats tiky/saves/"..player(id,"usgn")..".txt","r")
          if f ~= nil then
               for line in f:lines() do
                    currenthat[id] = tonumber(line)
                    break
               end
               loaded = true
               f:close()
          else 
		-- create new file
          end
     end
     if not loaded then
          currenthat[id] = 0
     end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview