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
26
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--------------------------------------------
-- Paintball Game-Mode for CC --
-- Script By Dannyeth, 2/3.Oct.2010 --
--------------------------------------------
-- Setup the tables and other stuff
if ccdd = nil then ccdd = {}
ccdd.pntbllmsk.gfx=loadgfx("gfx/paintmask.bmp")
players = playertable()
addgamemode("pntbll","PaintBall")
function pntbll_gm_draw()
	for i=0, #players do
		x = getplayerx(i)
		y = getplayery(i)
		drawimage(ccdd.pntbllmsk.gfx, x, y)
	end
end
function pntbll_gm_update()
	-- Do nothing...
end function
function pntbll_gm_playerdamage(id)
	return getplayerhealth(id) -- Kill the player instantly, this is paintball --
end
The error says it is in line 7, which is where i define the ccdd table. I can;t see anything wrong here, is it becuase i missed a ";" or what? I dont really know what is wrong as it looks fine to me.
EDIT: I have tried placing an "end" at the end of the line where i setup the ccdd table but i still get an error message.
edited 2×, last 03.10.10 11:04:51 am
Error msg when testing new game-mode
1 
Offline
Lua isn't hard at all, if you understand the basics of scripting/programming ( which you kinda of get from SII
) you won't have any trouble learning Lua. Maybe I will write you a specialised tutorial and send you a link for it