Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old March 20, 2016, 20:47   #1
HermannD
Rookie
 
Join Date: Jan 2014
Posts: 13
HermannD is on a distinguished road
Question args / description mismatch in list-effects.h?

As it apparently works, I'm sure my confusion is due to some misunderstanding on my part. However, out of curiosity, I would like to clear this up: When reading list-effects.h I noticed that, just as I would expect from
Code:
 * args: how many arguments the description takes
[…]
 * description: text of description
that the value in the args column usually matches up to the number of c-format-specifiers (%s, %d) in the description column. But not for some effects, where args was 2, but there were only one or zero %-signs in the description:
Code:
2  	MON_HEAL_HP
2 % 	CURE
2 % 	RESTORE_STAT
2 % 	DRAIN_STAT
2 % 	LOSE_RANDOM_STAT
2 % 	GAIN_STAT
2 % 	PROJECT_LOS
2 % 	PROJECT_LOS_AWARE
So, what is the actual meaning of the args column?
__________________
? of *Destruction* makes the better maps.
HermannD is offline   Reply With Quote
Old March 20, 2016, 21:06   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 53
Posts: 7,174
Donated: $60
Nick is on a distinguished road
You understand perfectly, and those numbers in the args column are indeed wrong. The secret information is that the args column is not used in the code - I put it in originally in case I needed to use it, but in the end I didn't need to.

So the numbers are wrong, but it doesn't matter.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old March 20, 2016, 21:27   #3
HermannD
Rookie
 
Join Date: Jan 2014
Posts: 13
HermannD is on a distinguished road
Ah well, that was a possibility I briefly considered. Still kinda anticlimactic. I sent you a pull request on GitHub to sort that out anyway. A change only affecting unused data is guaranteed not to break anything and I like predetermined success. (=
__________________
? of *Destruction* makes the better maps.
HermannD is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Monster description error? Shockbolt Development 3 September 17, 2011 07:39
list experience value in Monster List view fbas Vanilla 1 November 24, 2010 19:51
Error in monsters description TJS Development 4 July 31, 2010 13:00
Serious problem with Aeglos description ClaytonAguiar Vanilla 2 May 26, 2010 20:15
Changing personal description Cardinal Rob Vanilla 1 April 3, 2008 14:39


All times are GMT +1. The time now is 12:22.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2018, vBulletin Solutions Inc.