Thread: Dwarf remains???

Results 1 to 10 of 10
  1. #1 Dwarf remains??? 
    Registered Member
    Join Date
    Jan 2019
    Posts
    13
    Thanks given
    1
    Thanks received
    1
    Rep Power
    11
    hi guys when im adding a world message i get this [Only registered and activated users can see links. ]

    this is the code im using what do i need to change?

    World.sendMessage(("@[email protected][Legendary Mystery Box]@[email protected] "+player.getUsername()+ " has recieved "+(ItemDefinition.forId(GetItemId).getName())+")") );
    Reply With Quote  
     

  2. #2  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,628
    Thanks given
    165
    Thanks received
    270
    Rep Power
    497
    Either GetItemId is a dwarf remain id or ItemDefinition.forId(GetItemId).getName()'s default value is dwarf remains.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jan 2019
    Posts
    13
    Thanks given
    1
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by arch337 View Post
    Either GetItemId is a dwarf remain id or ItemDefinition.forId(GetItemId).getName()'s default value is dwarf remains.
    yeah, so how do i pronounce the codeline that will get the itemid that u get from the box?
    Reply With Quote  
     

  4. #4  
    Registered Member
    arch337's Avatar
    Join Date
    Sep 2008
    Posts
    2,628
    Thanks given
    165
    Thanks received
    270
    Rep Power
    497
    Quote Originally Posted by Vendi668 View Post
    yeah, so how do i pronounce the codeline that will get the itemid that u get from the box?
    Share the code for both the ItemDefinition.forId(GetItemId).getName() method and the code above that determ the GetItemId.


    "A fail act is something you do regular, but a dumb act is something you can learn from"
    Spoiler for Problem?:
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    Jan 2019
    Posts
    13
    Thanks given
    1
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by arch337 View Post
    Share the code for both the ItemDefinition.forId(GetItemId).getName() method and the code above that determ the GetItemId.
    i ahve no clue where to find that, i typed that code myself
    Reply With Quote  
     

  6. #6  
    Be the change you wanna see!
    Nozemi's Avatar
    Join Date
    Jul 2010
    Posts
    254
    Thanks given
    60
    Thanks received
    57
    Rep Power
    40
    Quote Originally Posted by Vendi668 View Post
    i ahve no clue where to find that, i typed that code myself
    Share the whole function that houses this line of code:
    Code:
    World.sendMessage(("@[email protected][Legendary Mystery Box]@[email protected] "+player.getUsername()+ " has recieved "+(ItemDefinition.forId(GetItemId).getName())+")") );
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    Jan 2019
    Posts
    13
    Thanks given
    1
    Thanks received
    1
    Rep Power
    11
    Quote Originally Posted by Nozemi View Post
    Share the whole function that houses this line of code:
    Code:
    World.sendMessage(("@[email protected][Legendary Mystery Box]@[email protected] "+player.getUsername()+ " has recieved "+(ItemDefinition.forId(GetItemId).getName())+")") );
    can u add me on discord? Nigel#1185
    Reply With Quote  
     

  8. #8  
    Be the change you wanna see!
    Nozemi's Avatar
    Join Date
    Jul 2010
    Posts
    254
    Thanks given
    60
    Thanks received
    57
    Rep Power
    40
    Quote Originally Posted by Vendi668 View Post
    can u add me on discord? Nigel#1185
    Why can't you just post that method here?
    Reply With Quote  
     

  9. #9  
    Donator


    Join Date
    Apr 2014
    Posts
    617
    Thanks given
    65
    Thanks received
    203
    Rep Power
    444
    The value
    Code:
    GetItemId
    is an integer value representing the id of the item your fetching the definition of.
    So find out what value that is, u could add this line to print the id:
    Code:
    player.sendMessage("itemId = "+GetItemId);
    Now u know the item id, look into your item definitions file (usually this is a .json file in a folder named "data").

    Lookup the definition defined for the item id you just printed.
    It is either not defined at all or it is assigned to a nulled item.
    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  10. #10  
    ✥Blade Owner✥

    TeJay's Avatar
    Join Date
    Jul 2017
    Posts
    502
    Thanks given
    132
    Thanks received
    173
    Rep Power
    769
    I fixed it for him.
    [Only registered and activated users can see links. ]

    Spoiler for Services:
    [Only registered and activated users can see links. ]
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [PI] meh dwarf remains.
    By blacksh00t in forum Help
    Replies: 3
    Last Post: 08-26-2010, 02:11 PM
  2. Replies: 0
    Last Post: 08-07-2010, 08:48 AM
  3. Strange - Dwarf Remains
    By Sp3ke in forum Help
    Replies: 5
    Last Post: 06-22-2010, 01:30 AM
  4. Dwarf Remains/New Items
    By Demetri in forum Help
    Replies: 10
    Last Post: 08-09-2009, 07:51 PM
  5. dwarf remains spawning
    By atrix676 in forum Help
    Replies: 1
    Last Post: 06-30-2009, 12:27 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •