Forum

> > CS2D > Scripts > Error script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Error script

5 replies
To the start Previous 1 Next To the start

old Error script

Ridho
User Off Offline

Quote
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'
-----------------------------

old Re: Error script

Ridho
User Off Offline

Quote
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)

old Re: Error script

Ridho
User Off Offline

Quote
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

old Re: Error script

Apache uwu
User Off Offline

Quote
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
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview