why this script do not work?
3 replies
1

30.06.12 07:42:25 pm
addhook("menu","teleport")
function teleport(id,title,button)
if title == "Music" then
if button == 3 then
parse ("setpos "..id.." 2290 108")
end
end
end
end
--- this not work, please fix it
function teleport(id,title,button)
if title == "Music" then
if button == 3 then
parse ("setpos "..id.." 2290 108")
end
end
end
end
--- this not work, please fix it
Code:
1
2
3
4
5
6
7
8
2
3
4
5
6
7
8
addhook("menu","teleport")
function teleport(id,title,button)
if title == "Music" then
if button == 3 then
parse ("setpos "..id.." 2290 108")
end
end
end
function teleport(id,title,button)
if title == "Music" then
if button == 3 then
parse ("setpos "..id.." 2290 108")
end
end
end
That's how.
problems:
- you didn't use the code tag
- you have one "end" too much
- you didn't declare a menu called "Music" (it is completely missing)
watch up example scripts. if someone does that simple script for you, you won't learn from it.
- you didn't use the code tag
- you have one "end" too much
- you didn't declare a menu called "Music" (it is completely missing)
watch up example scripts. if someone does that simple script for you, you won't learn from it.
He could learn from looking at the scripts you post.
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
addhook("menu","teleport")
function teleport(id,title,button)
if title~="Music" then
return 0
end
if button==3 then
parse("setpos "..id.." 2290 108")
end
end
addhook("serveraction","_serveraction")
function _serveraction(id,action)
menu(id,"Music,,,Teleport")
end
function teleport(id,title,button)
if title~="Music" then
return 0
end
if button==3 then
parse("setpos "..id.." 2290 108")
end
end
addhook("serveraction","_serveraction")
function _serveraction(id,action)
menu(id,"Music,,,Teleport")
end
1








why this script do not work?
