Forum

> > CS2D > Scripts > load money bug plz fix
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch load money bug plz fix

11 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt load money bug plz fix

lagger33
User Off Offline

Zitieren
plz help me, i cant load my database, so if i start the game the money default again (100)
here is the lua
1)addhook join
Spoiler >

2) save & load lua
Spoiler >

how to connect the first lua with second lua?
the save is working , but not with the load
in other thread i know put the
Spoiler >

to the
Spoiler >

but i dont know put it where
sorry im newbie lua editor
please tell me where i should put them

alt Re: load money bug plz fix

uaiek
User Off Offline

Zitieren
Simply copy and paste the second script at the end of the first script.

Like this
Spoiler >

alt Re: load money bug plz fix

lagger33
User Off Offline

Zitieren
user uaiek hat geschrieben
Simply copy and paste the second script at the end of the first script.

Like this
Spoiler >

still not working, money still bug, can save cant load

alt Re: load money bug plz fix

lagger33
User Off Offline

Zitieren
user uaiek hat geschrieben
Run your server again and look at the console and tell the red LUA ERROR.

no lua error just not working, the money still 100 (default) each game start

alt Re: load money bug plz fix

Chingy
User Off Offline

Zitieren
Use your brain and think yourself about it why it doesn't work. God damn it I can't just ignore those kids who know a shit about starting a server but still want to do it.

alt Re: load money bug plz fix

Chingy
User Off Offline

Zitieren
user Eternal hat geschrieben
Have you try it with dedicated server? if no , try this dedicated server out , for Windows and for Linux and then tell us your result.

I guess he has Windows. Every idiot which don't know how to use a computer correctly uses Windows.

alt Re: load money bug plz fix

Gaios
Reviewer Off Offline

Zitieren
Zitat
still not working, money still bug, can save cant load

> See what the program is written to the file.

Maybe load bug.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function LoadUserStat(id,file)
     for line in file:lines() do
          local parses = totable(line)
          local userMoney = tonumber(parses[1])
          if userMoney ~= nil then
               rp_money[id] = userMoney
          elseif tonumber(parses[2]) ~= nil then
               rp_license[id] = tonumber(parses[2])
          elseif tonumber(parses[3]) == 1 then
               rp_arrest[id]=true
               rp_license[id]=0
          end
          
          local counter = 3
          for k,v in ipairs(Addons) do
               counter = counter + 1
               local LicItem = tonumber(parses[counter])
               if LicItem ~= nil then
                    v.FLic[id] = LicItem
               else
                    v.FLic[id] = 0
               end
          end
     end
end

alt Re: load money bug plz fix

MikuAuahDark
User Off Offline

Zitieren
from the code, im know that he use file Datei existiert nicht (4733). here some solution:
1. Create folder at <cs2ddirectory>\sys\lua called "rp_citylife"(without quotes)
2. Try to start as administrator if you install it at Program Files and if you using windows7
3. Iif both above still not working, well try a code above my post.

but i see from your code(user lagger33) it should work fine so solution 1 or 2 should fix your problem
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht