Blockland Forums > Modification Help
Add to the player's inventory?
<< < (2/3) > >>
Chrono:
Should be using .getID() instead of nameToID anyways.
Greek2me:

--- Quote from: Slicksilver on February 22, 2012, 07:46:21 PM ---I believe names are resolved to object IDs before code is executed, making nameToID a needless extra step in this case.

--- End quote ---
I seem to remember that this was a strange case in which you do need to use nameToID because you're just setting it to a variable. Try it with and without nameToId and see what happens. Pretty sure it works when using nameToID.


--- Quote from: Chrono on February 22, 2012, 07:51:29 PM ---Should be using .getID() instead of nameToID anyways.

--- End quote ---
That causes errors if the item doesn't exist.
Chrono:

--- Quote from: Greek2me on February 22, 2012, 07:53:07 PM ---That causes errors if the item doesn't exist.

--- End quote ---
Don't use it with something that doesn't exist.
Destiny/Zack0Wack0:

--- Quote from: Chrono on February 22, 2012, 08:01:08 PM ---Don't use it with something that doesn't exist.

--- End quote ---
Or use nameToID and not have to do that? Logic.

--- Quote from: Greek2me on February 22, 2012, 07:53:07 PM ---I seem to remember that this was a strange case in which you do need to use nameToID because you're just setting it to a variable. Try it with and without nameToId and see what happens. Pretty sure it works when using nameToID.
That causes errors if the item doesn't exist.

--- End quote ---
500% sure that names will not work because the datablock IDs are what are used for the UI tables and such, so that's why you need to provide a datablock ID when using network functions. I haven't tried before though, it could work.
Greek2me:

--- Quote from: Destiny/Zack0Wack0 on February 22, 2012, 11:24:47 PM ---500% sure that names will not work because the datablock IDs are what are used for the UI tables and such, so that's why you need to provide a datablock ID when using network functions. I haven't tried before though, it could work.

--- End quote ---
Correct.
Navigation
Message Index
Next page
Previous page

Go to full version