Forum

> > CS2D > General > got another error
Forums overviewCS2D overviewGeneral overviewLog in to reply

English got another error

1 reply
To the start Previous 1 Next To the start

old got another error

KagamineLen
User Off Offline

Quote
oh i got another problem please help

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
60
61
62
63
64
addhook('say', '_say')
function _say(id, text)


--[ Help Player ]--

if text == '!help' then
parse('sv_msg2 '.. id ..' !laser - Equip Laser')
parse('sv_msg2 '.. id ..' !armor83 - Equip Super Armor')
parse('sv_msg2 '.. id ..' !armor82 - Equip Medic Armor')
parse('sv_msg2 '.. id ..' !equipall - Equip all Weapon')
parse('sv_msg2 '.. id ..' !speed - Set Speed to 100')
end

--[ Help Player ]--

--[ Laser ]--

if text == '!laser' then
parse('equip '.. id ..' 45')
end

--[ Laser ]--

--[ SuperArmor ]--

if text == '!armor83' then
parse('equip '.. id ..' 83')
end

--[ SuperArmor ]--

--[ MedicArmor ]--

if text == '!armor82' then
parse('equip '.. id ..' 82')
end

--[ MedicArmor ]--

--[ Equip All ]--

if text == '!equipall' then
for i = 1, 100 do
if itemtype(i, 'name') != '' then
parse('equip '..id..' '..i)
parse('equip '..id..' 82)
end
end

--[ Equip All ]--

--[ Speedmod ]--

local cmd1=txt:sub(0,6)
local cmd2=txt:sub(6,10)

if cmd1 == '!speed' then
parse('speedmod '.. id ..' cmd2')
end

--[ Speedmod ]--

end

old Re: got another error

Banaan
User Off Offline

Quote
How about telling us what the problem is?

Please use some indentation and take a look at this piece of code.

1
2
3
4
5
6
7
if text == '!equipall' then
for i = 1, 100 do
if itemtype(i, 'name') != '' then
parse('equip '..id..' '..i)
parse('equip '..id..' 82)
end
end
To the start Previous 1 Next To the start
Log in to replyGeneral overviewCS2D overviewForums overview