Blockland Forums > General Discussion

Are item ids constant? Is there a way to get an id back into a name?

Pages: (1/1)

DrenDran:

Like if I do:
$bob = nametoID("RocketLauncherItem");
will $bob be the same time every time even if I get new add-ons, or at the very least, restart blockland?
And is there a way to do something comparable to 'idtoName(%a)' ?

I suppose this could be considered a coding question, but I'm really more curious about how the item ids work.

DrenDran:

Never mind, I figured it out on my own.
It's like this:
$bob.getName();
would get it's name back again.

Chrono:


--- Quote from: DrenDran on November 14, 2010, 05:03:18 AM ---will $bob be the same time every time even if I get new add-ons, or at the very least, restart blockland?
--- End quote ---
No, but only if you change your add-ons list.


--- Quote from: DrenDran on November 14, 2010, 06:35:24 AM ---Never mind, I figured it out on my own.
It's like this:
$bob.getName();
would get it's name back again.

--- End quote ---
You can also do RocketLauncherItem.getID(); to get the ID.

Pages: (1/1)

Go to full version