Author Topic: what's a (null)?  (Read 980 times)

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
what's a (null)?
« on: October 10, 2005, 06:47:10 am »
every once in a while i will loot a (null). so i wonder what it is and why it doesn\'t appear in my inventory.

i think it maybe related to a tria amount generation, but i\'m not sure. i think i see it most with thugs and trepors. critters that drop tria when killed.
may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.

stfrn

  • Hydlaa Citizen
  • *
  • Posts: 324
  • the beaver ex-dev :B
    • View Profile
(No subject)
« Reply #1 on: October 10, 2005, 06:53:46 am »
It\'s like a rat hide but... well, no. It\'s actually one or more hexas.
You see, when a program is told to output something, but is not given anything , it outputs null. There was a bug where if only hexa was looted, it didn\'t know what to call it, so it juse said null. Fixed in the next update.
player -> gm -> dev -> bum

steuben

  • Veteran
  • *
  • Posts: 1834
    • View Profile
    • Myspace
(No subject)
« Reply #2 on: October 10, 2005, 06:55:54 am »
really cause, i seem to recall having looted only hexa on occastion, and not get a (null). or does it only occastionally crop up?

checks his scroll back... maybe not. i\'m probably just substituting my own reality there.
« Last Edit: October 10, 2005, 06:57:37 am by steuben »
may laanx frighten the shadow from my path.
hardly because the shadow built the lexx.
the shadow will frighten laanx from my path.

DaveG

  • Forum Addict
  • *
  • Posts: 2058
    • View Profile
(No subject)
« Reply #3 on: October 10, 2005, 01:40:18 pm »
Quote
Originally posted by stfrn
You see, when a program is told to output something, but is not given anything , it outputs null.

Technically, when a program is told to output something it doesn\'t have, it just outputs whatever is at the memory location of where it\'s looking... usually a pile of garbage, that it doesn\'t have access to, resulting in a lovely segfault crash.  Having the variable in question output (null) as default is a much better result.  :P

::  PlaneShift Team Programmer  ::

khellendros1984

  • Wayfarer
  • *
  • Posts: 2
    • View Profile
(No subject)
« Reply #4 on: October 19, 2005, 09:14:34 am »
Depends on the language....java returns a null object type....but yea, C/C++ return the data at specified memory location. Stupid java, not treating pointers like pointers....