View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002308SphereServernew feature requestpublic14-04-14 16:3617-04-14 21:07
Reporterwuffel 
Assigned ToBen 
PrioritynormalSeverityfeatureReproducibilityalways
StatusclosedResolutionno change required 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0002308: itemdef0, chardef0, typedef0, etc.
Descriptioni would like the possibility to check if a specific definition exists or not.
for example .show serv.itemdef.i_double works (returns 0) but also throws an error to the logfile.
show serv.itemdef.i_doublet instead works fine.
serv.itemdef0.i_double to handle those error-messages. Also to have this ability for all other definitions would be nice. :)
TagsNo tags attached.
Nightly VersionNot Available
Experimental FlagsNone
Option FlagsNone
Internal Build Number
Attached Files

- Relationships

-  Notes
(0002047)
Coruja (developer)
14-04-14 16:49

I reported it some months ago too
to prevent console error you need to use DEF to check if the item exists

IF (<DEF0.i_doublet>) || (<DEF0.c_man>) || (<DEF0.t_normal>)
  ...
ENDIF

this can prevent console errors on scripts, but can't prevent when some GM try to add manually an itemdef that doesn't exist (using '.add i_something')
(0002053)
Ben (manager)
17-04-14 21:07

The problem with this is that the error comes from not being able to resolve the defname to an internal value.
Like Coruja mentioned, use DEF0.<value> to check if that defname exists, there is no point in adding itemdef0, chardef0, typedef0, and more to do exactly what DEF0 already does.

- Issue History
Date Modified Username Field Change
14-04-14 16:36 wuffel New Issue
14-04-14 16:49 Coruja Note Added: 0002047
17-04-14 21:07 Ben Note Added: 0002053
17-04-14 21:07 Ben Status new => closed
17-04-14 21:07 Ben Assigned To => Ben
17-04-14 21:07 Ben Resolution open => no change required


Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker