I've messaged
DC about it and hope that he'll fix it soon.UNTIL IT'S FIXED: Please DON'T start maps you've downloaded from servers on your pc / server! It's for your own safety!
General
ATTENTION! Don't run maps you've downloaded!
DC about it and hope that he'll fix it soon.
Zeik has written
DC should do: Show contents of all these triggers in a preview (just guessing what you're talking about,
ohaz)
gotya2: They're useful, but the Lua script that is running on Trigger_If should work in a different function environment with the same Lua functions as the main state, except that it locks it from using the os/io tables.
Zeik has written
DC has written
§5.3 - No memes, ASCII art or comparable fun pictures
Yates has writtenTriggerMeta = {}
function TriggerMeta.__index(t,k)
	if k == "os" or k == "io" then
		return nil
	elseif k == "_G" then
		return t
	end
	return _G[k]
end
function TriggerMeta.__newindex(t,k,v)
	if k == "os" or k == "io" then
		return nil
	end
	_G[k] = v
end
addhook("triggerentity","trigger_if")
function trigger_if(x,y)
	if entity(x, y, "typename") == "Trigger_If" then
		local FunctionEnvironment = {}
		setmetatable(FunctionEnvironment, TriggerMeta)
		local Script = loadstring("return "..entity(x, y, "str0"))
		setfenv(Script, FunctionEnvironment)
		local Success, Error = pcall(Script)
		if Success then
			parse("trigger "..entity(x, y, "trigger"))
		elseif Error then
			print("©255000000LUA ERROR: entity("..x..","..y.."): "..Error)
		end
		return 1
	end
end
DC: Not only Linux based systems has file permissions though. You could create a user with read only privileges for specific applications and folders in Windows. That's why I look at this with sceptism because it's not really more than a false positive. You can simply secure your CS2D folder by applying appropriate file/folder permissions to fix the problem. You can even make, so that CS2D executable can't write to anywhere else but it's own directories, so yea... just saying. I would consider it a rather harmless threat from my knowledge but yea it's indeed pretty bad for people with PC's running on administrator accounts or the likes, so that could be the only problem.
dofile("include.lua");
mapInput = "test";
local error = LoadMap(mapInput)
if (error == "") then
	local e = GetEntityList()
	local i
	for i = 1, #e do
		if e[i].type == 96 then
			print(e[i].str[1])
		end
	end
else
	print(error);
end
TimeQuesT:
ohaz: since your saying "There is a pretty serious bug" Don't want to know but I have to ask this stupid I got. How did you know?