English why this script do not work?

3 replies
Goto Page
To the start Previous 1 Next To the start
30.06.12 07:42:25 pm
Up
wato24
User
Offline Off
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
30.06.12 07:48:28 pm
Up
schattex
User
Offline Off
Code:
1
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


That's how.
30.06.12 07:50:29 pm
Up
Dolan pls
User
Offline Off
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.
30.06.12 08:13:23 pm
Up
Rumine
User
Offline Off
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
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
To the start Previous 1 Next To the start