You should be moving vnums from sh_int to int, not int to long int.

Going through the code and changing %d to %ld is not necessary.

%hd is the correct format for printing short integers, so if you want to be 
correct, you should have been using that to print out vnums all along.

The reality is that short ints are converted to normal ints when they are 
passed to a function..  And long ints are the same size as normal ints on 
most machines.  So %d can handle any of them gracefully.

> Like everyone said, change the int to a long.  Now... here's some
> suggestions on bug catching other than compiler errors and warnings.  Note
> the vnum fields you changed ch->in_room->vnum (the room data, etc).. and
> grep through the files for all those occurances... then go through each of
> those and change the %d to %ld.  Once you get it compiled you'll know when
> you access a field you didn't change because you'll crash and gdb should
> plainly show you the problem.  I did this around a year ago by hand and
> though it took a long time, it really wasn't that bad.  Just in case
> though, back up your code :)


Reply via email to