Capacity error
7 replies



21.05.11 05:45:13 pm
Code:
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
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
Code
function st1(st)
local st = {}
for i = 1, st do
st[i]=0
end
return st
end
Capacity=st1(32)
Capacity11=st1(32)
Heath=st1(32)
maxheath=150 --set heath player
addhook("spawn" , "LEQ")
function LEQ(id)
Capacity=Heath
parse('hudtxt2 '..id..' 30 "©255128000Capacity: '..Capacity[id]..'" 239 393 ')
Capacity11[id]=0
Heath[id]=0
maxheath[id]=0
end
addhook("move" , "LEQ2")
function LEQ2(id)
msg2(id,"©000255255kill enemy +11 capacity@C")
parse('hudtxt2 '..id..' 30 "©255128000Capacity: '..Capacity11[id]..'" 239 393 ')
addhook("menu" , "menu_m")
function menu_m(id,title, button)
menu(id,"Menu Heath,Capacity +20|Heath -17,Heath+32|Capacity-9,Transformation|Hth+150 -100Cpc")
if (title=="Menu Heath") then
if button==1 then
menu(id,"Capacity +11|Heath -17,Heath+32|Capacity-9,Transformation|Hth+150 -100Cpc")
elseif button==2 then
menu(id,"Heath+32|Capacity-9,Transformation|Hth+150 -100Cpc")
elseif button==3 then
menu(id,"Transformation|Hth+150 -100Cpc")
end
end
end
if (title=="Capacity...") then
if button==1 then
parse('hudtxt2 '..id..' 30 "©000255255Capacity: '..Capacity11[id]..'" 239 393 ')
end
end
end
function st1(st)
local st = {}
for i = 1, st do
st[i]=0
end
return st
end
Capacity=st1(32)
Capacity11=st1(32)
Heath=st1(32)
maxheath=150 --set heath player
addhook("spawn" , "LEQ")
function LEQ(id)
Capacity=Heath
parse('hudtxt2 '..id..' 30 "©255128000Capacity: '..Capacity[id]..'" 239 393 ')
Capacity11[id]=0
Heath[id]=0
maxheath[id]=0
end
addhook("move" , "LEQ2")
function LEQ2(id)
msg2(id,"©000255255kill enemy +11 capacity@C")
parse('hudtxt2 '..id..' 30 "©255128000Capacity: '..Capacity11[id]..'" 239 393 ')
addhook("menu" , "menu_m")
function menu_m(id,title, button)
menu(id,"Menu Heath,Capacity +20|Heath -17,Heath+32|Capacity-9,Transformation|Hth+150 -100Cpc")
if (title=="Menu Heath") then
if button==1 then
menu(id,"Capacity +11|Heath -17,Heath+32|Capacity-9,Transformation|Hth+150 -100Cpc")
elseif button==2 then
menu(id,"Heath+32|Capacity-9,Transformation|Hth+150 -100Cpc")
elseif button==3 then
menu(id,"Transformation|Hth+150 -100Cpc")
end
end
end
if (title=="Capacity...") then
if button==1 then
parse('hudtxt2 '..id..' 30 "©000255255Capacity: '..Capacity11[id]..'" 239 393 ')
end
end
end
edited 1×, last 21.05.11 05:55:25 pm
No fuck me
Oh, it's me who needs to say sorry, i thought you were one more of those retards who keeps creating stupid threads like: "Hello", or "Help!!1!1!1!!"
Sorry
Sorry

One of the problems is that the For limit must be a number and you are using an array as the limit value.
PS: if im wrong just correct me.
PS: if im wrong just correct me.
@FN_Linkin Park
You are right.
Should be
Because if you name the argument and the table the same it won't work.
You are right.
Code:
1
2
3
4
5
6
7
2
3
4
5
6
7
function st1(st)
local st = {}
for i = 1, st do
st[i]=0
end
return st
end
local st = {}
for i = 1, st do
st[i]=0
end
return st
end
Should be
Code:
1
2
3
4
5
6
7
2
3
4
5
6
7
function st1(st)
local stt = {}
for i = 1, st do
stt[i]=0
end
return stt
end
local stt = {}
for i = 1, st do
stt[i]=0
end
return stt
end
Because if you name the argument and the table the same it won't work.
I code, therefore I exist.



