LUA ERROR: sys/lua/nazi_zombies.lua:59: 'end' expected (to close 'if' at line 11) near
Here is the script:
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
round = 1
npcs = 2
addhook("startround","round1")
function round1()
msg("©255000000Round "..round)
npcs=(round*3)-round
local xr=math.random(0,map("xsize"))
local yr=math.random(0,map("ysize"))
for i=1,npcs do
if (tile(xr,yr,"property")~=1 and tile(xr,yr,"property")~=1 and tile(xr,yr,"property")~=2 and tile(xr,yr,"property")~=3 and tile(xr,yr,"property")~=4 and tile(xr,yr,"property")~=50 and tile(xr,yr,"property")~=51 and tile(xr,yr,"property")~=52 and tile(xr,yr,"property")~=53) then
parse("spawnnpc 1 "..xr.." "..yr.." 0")
else
ound = 1
npcs = 2
addhook("startround","round1")
function round1()
msg("©255000000Round "..round)
npcs=(round*3)-round
local xr=math.random(0,map("xsize"))
local yr=math.random(0,map("ysize"))
for i=1,npcs do
if (tile(xr,yr,"property")~=1 and tile(xr,yr,"property")~=1 and tile(xr,yr,"property")~=2 and tile(xr,yr,"property")~=3 and tile(xr,yr,"property")~=4 and tile(xr,yr,"property")~=50 and tile(xr,yr,"property")~=51 and tile(xr,yr,"property")~=52 and tile(xr,yr,"property")~=53) then
parse("spawnnpc 1 "..xr.." "..yr.." 0")
else
parse("spawnnpc 1 "..xr.." "..yr.." 0")
end
end
end
addhook("objectkill","npckill")
function npckill(obj,id)
if (object(obj,"type")==30) then
if (npcs>1) then
npcs=npcs-1
else
npcs=0
timer(30000,"parse","lua changeround()")
end
end
end
function changeround()
round=round+1
msg("©255000000Round "..round)
npcs=(round*3)-round
for n=1,npcs do
local xr=1,map("xsize")
local yr=1,map("ysize")
if (tile(xr,yr,"property")~=1 and tile(xr,yr,"property")~=1 and tile(xr,yr,"property")~=2 and tile(xr,yr,"property")~=3 and tile(xr,yr,"property")~=4 and tile(xr,yr,"property")~=50 and tile(xr,yr,"property")~=51 and tile(xr,yr,"property")~=52 and tile(xr,yr,"property")~=53) then
parse("spawnnpc 1 "..xr.." "..yr.." 0")
else
local xr=1,map("xsize")
local yr=1,map("ysize")
parse("spawnnpc 1 "..xr.." "..yr.." 0")
end
end
end
So what is wrong with it?