Forum

> > CS2D > Scripts > Error script
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Error script

5 Antworten
Zum Anfang Vorherige 1 Nächste Zum Anfang

alt Error script

Ridho
User Off Offline

Zitieren
i have an error in my lua, help me pease
-----------------------------
addhook("join","bukafile")
function bukafile(id)
if player(id,"usgn")>0 then
local file = io.open ("sys/lua/coin_system/"..usgnid..".txt',"w+")
if file then
load(id,file)
if file ~= nil then
file:close()
end
end
end
end
-----------------------------
LUA ERROR: sys/lua/coin.lua:233: ')' expected near 'w'
-----------------------------

alt Re: Error script

Ridho
User Off Offline

Zitieren
after i changed it, i had an error again, but different now
LUA ERROR: sys/lua/coin.lua:219: attempt to concatenate global 'usgnid' (a nil value)

alt Re: Error script

Ridho
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
addhook("join","bukafile")
function bukafile(id)
if player(id,"usgn")>0 then
local file = io.open ("sys/lua/coin_system/"..usgnid..".txt","w+")
if file then
load(id,file)
if file ~= nil then
file:close()
end
end
end
end

alt Re: Error script

Apache uwu
User Off Offline

Zitieren
1
2
3
4
5
6
7
8
9
10
11
12
addhook("join","bukafile")
function bukafile(id)
	if player(id,"usgn")>0 then
		local file = io.open ("sys/lua/coin_system/"..player(id,"usgn")..".txt","w+")
		if file then
			load(id,file)
			if file ~= nil then
				file:close()
			end
		end
	end
end
Zum Anfang Vorherige 1 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht