Forum

> > CS2D > Scripts > [Fix] HC Admin Script
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch [Fix] HC Admin Script

21 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt [Fix] HC Admin Script

Starkkz
Moderator Off Offline

Zitieren
Hello, a lot of people has been complaining about errors on HC Admin Script since CS2D was updated, I modified a file and I'm getting no errors after that. I'd like to share that with you, and see if there's more to fix or not.

sys/lua/hc/core/main.lua
http://pastebin.com/7AM97661

alt Re: [Fix] HC Admin Script

Starkkz
Moderator Off Offline

Zitieren
@user The Gajos: There's no big difference, somehow the functions weren't accepting arg as a value that is set as default on functions. So I modified unpack(arg) to ... The script should work with that anyway.
2× editiert, zuletzt 22.06.15 15:46:01

alt Re: [Fix] HC Admin Script

Ajmin
User Off Offline

Zitieren
Actually whats happening?

How can be sure that any other scripts are not enquering the same problem?
1× editiert, zuletzt 22.06.15 15:51:36

alt Re: [Fix] HC Admin Script

Starkkz
Moderator Off Offline

Zitieren
@user Ajmin:
LuaJIT FAQ hat geschrieben
Q: Why do I get this error: "attempt to index global 'arg' (a nil value)"?
Q: My vararg functions fail after switching to LuaJIT!
LuaJIT is compatible to the Lua 5.1 language standard. It doesn't support the implicit arg parameter for old-style vararg functions from Lua 5.0.
Please convert your code to the Lua 5.1 vararg syntax.

Mike disabled 'arg', but '...' is still compatible.

1
2
3
function f(...)
	local arg = {...} -- This would be the "quickest" replacement
end

alt Re: [Fix] HC Admin Script

Starkkz
Moderator Off Offline

Zitieren
@user The Gajos: Lua 5.1 has arg built in, there's no need to define it in that case.
1
2
3
4
5
6
function f(...)
	print("arg = "..tostring(arg))
	for k, v in pairs(arg) do
		print("argument "..tostring(k).." = "..tostring(v))
	end
end

alt Re: [Fix] HC Admin Script

GeoB99
Moderator Off Offline

Zitieren
@user Kirito2K: He said within this week. He'll post the hot-fix to cover all known bugs include those who prevent the scripts to work properly. I talked with him about that on IRC.
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht