Forum

> > CS2D > Scripts > Another Script Error
Forums overviewCS2D overview Scripts overviewLog in to reply

English Another Script Error

3 replies
To the start Previous 1 Next To the start

old Another Script Error

KagamineLen
User Off Offline

Quote
I need a help with my script

LUA ERROR: sys/lua/amx2d/Scripts/ScriptGame.lua:93: 'end' expected (to close 'function' at line 2) near '<eof>'

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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
addhook('say', '_say')
function _say(id, text)

     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')





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

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

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

     if text == '!equipall' then
          parse('equip '.. id ..' 1')
          parse('equip '.. id ..' 2')
          parse('equip '.. id ..' 3')
          parse('equip '.. id ..' 4')
          parse('equip '.. id ..' 5')
          parse('equip '.. id ..' 6')
          parse('equip '.. id ..' 7')
          parse('equip '.. id ..' 8')
          parse('equip '.. id ..' 9')
          parse('equip '.. id ..' 10')
          parse('equip '.. id ..' 11')
          parse('equip '.. id ..' 20')
          parse('equip '.. id ..' 21')
          parse('equip '.. id ..' 22')
          parse('equip '.. id ..' 23')
          parse('equip '.. id ..' 24')
          parse('equip '.. id ..' 30')
          parse('equip '.. id ..' 31')
          parse('equip '.. id ..' 32')
          parse('equip '.. id ..' 33')
          parse('equip '.. id ..' 34')
          parse('equip '.. id ..' 35')
          parse('equip '.. id ..' 36')
          parse('equip '.. id ..' 37')
          parse('equip '.. id ..' 38')
          parse('equip '.. id ..' 39')
          parse('equip '.. id ..' 40')
          parse('equip '.. id ..' 41')
          parse('equip '.. id ..' 45')
          parse('equip '.. id ..' 46')
          parse('equip '.. id ..' 47')
          parse('equip '.. id ..' 49')
          parse('equip '.. id ..' 51')
          parse('equip '.. id ..' 52')
          parse('equip '.. id ..' 53')
          parse('equip '.. id ..' 54')
          parse('equip '.. id ..' 56')
          parse('equip '.. id ..' 57')
          parse('equip '.. id ..' 58')
          parse('equip '.. id ..' 59')
          parse('equip '.. id ..' 61')
          parse('equip '.. id ..' 64')
          parse('equip '.. id ..' 65')
          parse('equip '.. id ..' 66')
          parse('equip '.. id ..' 67')
          parse('equip '.. id ..' 68')
          parse('equip '.. id ..' 69')
          parse('equip '.. id ..' 72')
          parse('equip '.. id ..' 73')
          parse('equip '.. id ..' 74')
          parse('equip '.. id ..' 75')
          parse('equip '.. id ..' 76')
          parse('equip '.. id ..' 77')
          parse('equip '.. id ..' 78')
          parse('equip '.. id ..' 83')
          parse('equip '.. id ..' 85')
          parse('equip '.. id ..' 86')
          parse('equip '.. id ..' 87')
          parse('equip '.. id ..' 88')
     end

     if text == '!speed' then
          parse('speedmod '.. id ..' 100')
     end

end
edited 2×, last 13.08.11 10:34:12 am

old Re: Another Script Error

Cure Pikachu
User Off Offline

Quote
1
2
3
4
5
6
7
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 -- Add this

old Re: Another Script Error

archmage
User Off Offline

Quote
You forgot to end your first if statement.
Also, this is better to equip eveything.
1
2
3
4
5
for i = 1, 100 do
if itemtype(i, 'name') != '' then
parse('equip '..id..' '..i)
end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview