Forum

> > CS2D > Scripts > Can you guys fix this Expected Near Error Thing?
Forums overviewCS2D overview Scripts overviewLog in to reply

English Can you guys fix this Expected Near Error Thing?

2 replies
To the start Previous 1 Next To the start

old Can you guys fix this Expected Near Error Thing?

YehLQ2003
User Off Offline

Quote
Okay Guys I Got This Error
LUA ERROR: sys/lua/music.lua:5: '(' expected near '.1'

Okay Script This Is The Script:
----------------------------
if lua==nil then lua={} end
lua.music={}
----------------------------
addhook("say","lua.music.1")
function lua.music.1(id,txt)
if (txt=="!moveragedream") then parse("sv_sound \"ryosuke/ragedream.ogg\""); end
if (txt=="!movebreak2nite") then parse("sv_sound \"ryosuke/break_2_nite.ogg\""); end
if (txt=="!movearoundworld") then parse("sv_sound \"ryosuke/aroundworld.ogg\""); end
if (txt=="!secondtsummer") then parse("sv_sound \"ryosuke/summer.ogg\""); end
if (txt=="!pamsfragile") then parse("sv_sound \"ryosuke/sofragile.ogg\""); end
if (txt=="!brisingsun") then parse("sv_sound \"ryosuke/risingsun.ogg\""); end
end

addhook("say","lua.music.2")
function lua.music.2(id,txt)
if (txt=="!musichelp")
msg("!ryosuke")
end
end

addhook("say","lua.music.3")
function lua.music.3(id,txt)
if (txt=="!ryosuke")
msg("!moveragedream")
msg("!movebreak2nite")
msg("!movearoundworld")
msg("!secondtsummer")
msg("!pamsfragile")
msg("!brisingsun")
end
end

old Re: Can you guys fix this Expected Near Error Thing?

Ajmin
User Off Offline

Quote
Next time use a code tab instead of this...

Anyway here is the fixed 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
----------------------------
if lua==nil then lua={} end
lua.music={}
----------------------------
addhook("say","lua.music_1")
function lua.music_1(id,txt)
if (txt=="!moveragedream") then parse("sv_sound \"ryosuke/ragedream.ogg\""); end
if (txt=="!movebreak2nite") then parse("sv_sound \"ryosuke/break_2_nite.ogg\""); end
if (txt=="!movearoundworld") then parse("sv_sound \"ryosuke/aroundworld.ogg\""); end
if (txt=="!secondtsummer") then parse("sv_sound \"ryosuke/summer.ogg\""); end
if (txt=="!pamsfragile") then parse("sv_sound \"ryosuke/sofragile.ogg\""); end
if (txt=="!brisingsun") then parse("sv_sound \"ryosuke/risingsun.ogg\""); end
end

addhook("say","lua.music_2")
function lua.music_2(id,txt)
if (txt=="!musichelp") then
msg("!ryosuke")
end
end

addhook("say","lua.music_3")
function lua.music_3(id,txt)
if (txt=="!ryosuke") then
msg("!moveragedream")
msg("!movebreak2nite")
msg("!movearoundworld")
msg("!secondtsummer")
msg("!pamsfragile")
msg("!brisingsun")
end
end
To the start Previous 1 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview