ArcEmu: Teleporterstone.lua - ArcEmu

Jump to content

Toggle shoutbox Lastest Announcements

dfighter  : (07 December 2014 - 12:06 PM) Arcemu is in hibernation mode, please read http://arcemu.org/fo...showtopic=26903
dfighter  : (01 January 2013 - 05:56 PM) Arcemu wishes you all a happy new year!
Hasbro  : (12 September 2012 - 10:01 AM) Please excuse our outage from the web! Our web host had a major malfunction!
dfighter  : (01 September 2012 - 04:05 PM) Since the spam bots just don't want to stop, I've enabled admin verification when registering.
dfighter  : (23 January 2012 - 09:56 PM) Please note that from now on you will need to confirm your email on the wiki in order to edit it!
Hasbro  : (31 December 2011 - 12:50 PM) Happy New Years all!
Navid  : (26 December 2011 - 04:09 AM) Merry Christmas !!!!!! Happy holidays all :)
WAmadeus  : (24 December 2011 - 03:54 PM) Merry Christmas to all!
dfighter  : (24 December 2011 - 11:05 AM) The Arcemu team wishes y'all a Merry Christmukkah!
Hasbro  : (05 October 2011 - 12:53 PM) Looking for web designers for upcoming web related project. If you're interested in designing user interfaces contact me
dfighter  : (02 September 2011 - 03:47 PM) So who here wants vehicles in Arcemu? :P http://arcemu.org/fo...showtopic=25440
Hasbro  : (14 August 2011 - 03:25 PM) Join us on irc, grab an irc client and connect to irc.freenode.net join channel #arcemu /server irc.freenode.net:6667 /join #arcemu
jackpoz  : (03 August 2011 - 05:33 AM) to all Lua Engine (old one) users: please check http://arcemu.org/fo...showtopic=25274
Hasbro  : (20 May 2011 - 05:27 PM) Looking for people experienced with CMake configuration and setup! Contact me asap
Hasbro  : (15 May 2011 - 05:03 PM) ArcEmu is recruiting C++ programmers, contact Hasbro if interested.
paroxysm  : (03 May 2011 - 06:26 PM) Updated luabridge gossip example to describe the whole gossip creation process rather than just how to create menu. Gossip tutorial
paroxysm  : (23 April 2011 - 11:35 AM) Lua writers can refer to the Luabridge Tutorials section in the Wiki to learn how to write gossip code correctly.
Hasbro  : (20 April 2011 - 05:22 PM) Thank you for your continuous contribution of bug reports, we are working on them.
Hasbro  : (17 April 2011 - 03:20 AM) Please consider donating to support our bills. Donations can be sent using PayPal to donations@arcemu.org - Thank you for your support.
paroxysm  : (10 April 2011 - 12:43 AM) Refer to the Luabridge Tutorials section in the Wiki to learn the new syntax of luabridge.
Resize Shouts Area

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Teleporterstone.lua cant fix error

#1 User is offline   Nemmesis 

  • Newbie
  • Group: Members
  • Posts: 5
  • Joined: 09-August 09

Posted 11 August 2010 - 04:55 PM

first of all i want to thank everyone who will try to help me.

i have created a lua script with the help of a guide
however i get an error i searched all over the internet and found some things but i just cant fix it
so i hope someone els can fix it for me.

the error i get is:

'<eof>' expected near 'end'

i have uploaded my file plz take a look ad it.

http://filebeam.com/...df3263ead0b5d50


thx alot
0

#2 User is offline   Foereaper 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 184
  • Joined: 21-May 09

Posted 11 August 2010 - 06:02 PM

http://pastebin.com/qQCze2tM

There you go, should work now, had a couple errors in it, I'll point them out:

Firstly, you ended the function before including the submenus and teleport locations:

function OnSelect(unit, event, player, id, intid, code)
if(intid == 999) then
    item:GossipCreateMenu(3543, player, 0)
local race=player:GetPlayerRace()
if race==1 or race==3 or race==4 or race==7 or race==11 then
    item:GossipMenuAddItem(3, "Alliance Cities", 1, 0)
end
local race=player:GetPlayerRace()
if race==2 or race==5 or race==6 or race==8 or race==10 then
    item:GossipMenuAddItem(3, "Horde Cities", 2, 0)
end
    item:GossipMenuAddItem(3, "Eastern Kingdom Locations", 3, 0)
    item:GossipMenuAddItem(3, "Kalimdor Locations", 4, 0)
    item:GossipMenuAddItem(3, "Outland Locations", 5, 0)
    item:GossipMenuAddItem(3, "Northrend Locations", 6, 0)
    item:GossipMenuAddItem(3, "Azeroth Instances", 7, 0)
    item:GossipMenuAddItem(3, "Outlands Instances", 8, 0)
    item:GossipMenuAddItem(3, "Northrend Instances", 9, 0)
    item:GossipMenuAddItem(1, "Gurubashi arena", 420, 0)
    item:GossipMenuAddItem(4, "Remove Resurrection Sickness", 998, 0)
    item:GossipSendMenu(player)
    end
end


Secondly, you had it defined as "unit" in the function, however you used "item":

function OnSelect(unit, event, player, id, intid, code)
if(intid == 999) then
    item:GossipCreateMenu(3543, player, 0)


Third of all, you had a "local" for the item ID at the top, however it wasn't used for the registers, so I added that in for you too. Also added in proper indention.

Oh, and next time, please use pastebin to submit scripts.
0

#3 User is offline   Nemmesis 

  • Newbie
  • Group: Members
  • Posts: 5
  • Joined: 09-August 09

Posted 12 August 2010 - 07:26 AM

View PostFoereaper, on 11 August 2010 - 06:02 PM, said:

http://pastebin.com/qQCze2tM

There you go, should work now, had a couple errors in it, I'll point them out:

Firstly, you ended the function before including the submenus and teleport locations:

function OnSelect(unit, event, player, id, intid, code)
if(intid == 999) then
    item:GossipCreateMenu(3543, player, 0)
local race=player:GetPlayerRace()
if race==1 or race==3 or race==4 or race==7 or race==11 then
    item:GossipMenuAddItem(3, "Alliance Cities", 1, 0)
end
local race=player:GetPlayerRace()
if race==2 or race==5 or race==6 or race==8 or race==10 then
    item:GossipMenuAddItem(3, "Horde Cities", 2, 0)
end
    item:GossipMenuAddItem(3, "Eastern Kingdom Locations", 3, 0)
    item:GossipMenuAddItem(3, "Kalimdor Locations", 4, 0)
    item:GossipMenuAddItem(3, "Outland Locations", 5, 0)
    item:GossipMenuAddItem(3, "Northrend Locations", 6, 0)
    item:GossipMenuAddItem(3, "Azeroth Instances", 7, 0)
    item:GossipMenuAddItem(3, "Outlands Instances", 8, 0)
    item:GossipMenuAddItem(3, "Northrend Instances", 9, 0)
    item:GossipMenuAddItem(1, "Gurubashi arena", 420, 0)
    item:GossipMenuAddItem(4, "Remove Resurrection Sickness", 998, 0)
    item:GossipSendMenu(player)
    end
end


Secondly, you had it defined as "unit" in the function, however you used "item":

function OnSelect(unit, event, player, id, intid, code)
if(intid == 999) then
    item:GossipCreateMenu(3543, player, 0)


Third of all, you had a "local" for the item ID at the top, however it wasn't used for the registers, so I added that in for you too. Also added in proper indention.

Oh, and next time, please use pastebin to submit scripts.


well first of all i didnt expect someone to help me so fast, and you did a hell of a job fixing those errors.
they totaly made sence when i readed your reply thx for thx for that i am still learning so its good to get help from people like you.
however i get a new error now.

lua function arguments expected near endMenu

and i totally dont know what this means since i am just a beginner XD
i hope you can take another look ad it offcoarse you can use the script you put in pastebin yourself
0

#4 User is offline   Foereaper 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 184
  • Joined: 21-May 09

Posted 12 August 2010 - 10:24 AM

if(intid == 13) then
                item:GossipCreateMenu(99, player, 0)
                item:GossipMenuAddItem(1, "Magtheridon's Lair", 421, 0)
                item:GossipMenuAddItem(1, "Sepentshrine Cavern", 422, 0)
                item:GossipMenuAddItem(1, "Gruul's Lair", 386, 0)
                item:GossipMenuAddItem(1, "The Eye", 424, 0)
                item:GossipMenuAddItem(1, "Black Temple", 384, 0)
                item:GossipMenuAddItem(0, "[Back]", 999, 0)
                item:GossipS    endMenu(player)
        end


Oops, see what I did wrong there?

                item:GossipS    endMenu(player)


Change that to item:GossipSendMenu(player)
0

#5 User is offline   Nemmesis 

  • Newbie
  • Group: Members
  • Posts: 5
  • Joined: 09-August 09

Posted 12 August 2010 - 11:34 AM

ye man freaken awsome the script starts with no errors thx alot i could not have done this without you!!!!!!!!!!!

your the best.

however im sorry to say but there is one more problem i have created an item on wow-v but when i right click on it nothing happens how can i make this item so i can use it (you know right click it)


edit------ to test if the script is working i connected it with my heartstone and it works fine. now i just need to get it on a costum item cause i dont want every player to have this item XD
0

#6 User is offline   Foereaper 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 184
  • Joined: 21-May 09

Posted 12 August 2010 - 12:03 PM

copy the hearthstone item in your database, change name and entry, and there you go :)
0

#7 User is offline   Nemmesis 

  • Newbie
  • Group: Members
  • Posts: 5
  • Joined: 09-August 09

Posted 12 August 2010 - 12:20 PM

ye i was thinking about that.

good idea :)

thx for all your help man
0

#8 User is offline   Foereaper 

  • Enthusiast
  • PipPipPip
  • Group: Members
  • Posts: 184
  • Joined: 21-May 09

Posted 12 August 2010 - 12:33 PM

hehe, no problem
0

#9 User is offline   Nemmesis 

  • Newbie
  • Group: Members
  • Posts: 5
  • Joined: 09-August 09

Posted 12 August 2010 - 12:36 PM

ye i made a copie of hearthstone works fine now

again thx for all your help
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users