(nati): Use natargp() rather than natarg(), to avoid pointless

complaints about lack of contact.

(nati): Improve not-deity error message and change error code to
RET_FAIL.
This commit is contained in:
Markus Armbruster 2006-01-06 20:46:31 +00:00
parent 35941f97eb
commit 39ce96c63d

View file

@ -54,18 +54,16 @@ nati(void)
int poplimit, safepop, uwpop; int poplimit, safepop, uwpop;
double pfac; double pfac;
if (player->argp[1]) if (player->argp[1]) {
cnum = natarg(player->argp[1], "for which country? "); if (!(natp = natargp(player->argp[1], NULL)))
else return RET_SYN;
cnum = player->cnum; } else
natp = getnatp(player->cnum);
if ((natp = getnatp(cnum)) == 0)
return RET_SYN;
cnum = natp->nat_cnum;
if (!player->god && cnum != player->cnum) { if (!player->god && cnum != player->cnum) {
pr("Only deities can request a nation " pr("Only deities can request a nation report for another country.\n");
"report for a different country than yourself.\n"); return RET_FAIL;
return RET_SYN;
} }
pr("\n(#%i) %s Nation Report\t", cnum, cname(cnum)); pr("\n(#%i) %s Nation Report\t", cnum, cname(cnum));