Project

General

Profile

Bug #914

Give command help vs implementation syntax discrepancy

Added by shiny666 about 12 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
2010-05-31
% Done:

100%


Description

keywords: hexen iwad, console, give command, syntax

the help function of the give command reports that the syntax for giving a specifig weapon will be a command such as "give w4" for the 4th weapon (hexen), but instead gives me all weapons and outputs: What do you mean, '4'?

p.s. how will i give mana; what is it : {item, health, key, puzzle piece, weapon}
for what it's worth, my preference given your apparent syntax model for the command is a major item type mana, possibly with subtypes mana1 & mana2 with aliases bluemana(mana1) and greenmana (mana2).

thank you for your time and attention
shiny

Labels: Console

History

#1 Updated by danij about 12 years ago

The reason it behaves the way it does is because '4' is not a valid weapon id in Hexen. Weapon ids are zero-based meaning [0...3] rather than [1...4]. Consequently the string "w4" is being interpreted as "all weapons", "invalid value".

I have revised the implementation so that an invalid suffix invalidates the whole substring (give no weapons if not valid) and to output some more helpful error messages.

In addition I have implemented "give a" to give ammo in Hexen. I didn't go with "give m" because we want the name to be as generic as possible and it can be argued that mana is just a specific type of ammo.

Also available in: Atom PDF