On Wed, 1 May 2002, tyler wrote: >I am working on CircleMUD, version 3.00 beta patchlevel 14 RedHat linux >7.2. The mud has max exp/gold at 2000000000 and I would like to move >this to 3 or 4 bill because when players go over the max they go into >loss. My attempts at doing this have failed. Here are the errors I get: > >act.wizard.c:5726: warning: decimal constant is so large that it is >unsigned You have four options, changing: int gold; int exp; to: A) 'unsigned int', and the audit every bit of code that uses gold and experience to make sure they use unsigned integers as well and don't let it go negative. Then you get 0 to 4,294,967,296. B) 'long', and buy a 64-bit platform like Alpha, Itanium, or Sparc64. 9,223,372,036,854,775,808 should be enough for you. C) 'long long', and take a speed hit and hope the compiler doesn't have any errors compiling the code. Same range as B), just a lot slower. D) just holding smaller numbers, requiring a change to all your mobiles and existing players. 4 billion experience? Phew. The decimal constant warning can be eliminated by tagging your numbers as "1000UL" (for 'U'nsigned 'L'ong). -- George Greer greerga@circlemud.org -- +---------------------------------------------------------------+ | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html | | Newbie List: http://groups.yahoo.com/group/circle-newbies/ | +---------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 06/25/03 PDT