EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Support::Windows Servers (https://www.eqemulator.org/forums/forumdisplay.php?f=587)
-   -   Trouble with DR3 (https://www.eqemulator.org/forums/showthread.php?t=18142)

hellkat138 03-29-2005 05:07 AM

C2177
 
Im getting the exact same thing he is on visual basic 2003

garim12 04-10-2005 09:48 AM

I had the same problem on my machine using Visual Studio .NET 2003... the real root of the problem is that Microsoft's compilers rarely tell you where the real problem is. They'll claim a problem with a line like

GroupEXPBonus = 0.1;

when the real problem is in a completely different source file that it included 1000 lines ago.
According to FLT_MAX on my system, the max size for a float in VS.NET 2k3 is about 3.4e38... so all the recently changed lines that increased constant sizes will break this compiler.


Anyway, here's all the places in the recent CVS version where constants are too big for VS.NET 2k3:


zone\client.cpp, line 209-211
Quote:

proximity_x = 9e100; //arbitrary large number
proximity_y = 9e100;
proximity_z = 9e100;

zone\client.h, line 293
Quote:

inline void ClearAllProximities() { entity_list.ProcessMove(this, 1000e99, 1000e99, 1000e99); proximity_x = 1000e99; proximity_y = 1000e99; proximity_z = 1000e99; }

zone\map.cpp, line 83-88
Quote:

_minz = 999999e111;
_minx = 999999e111;
_miny = 999999e111;
_maxz = -999999e111;
_maxx = -999999e111;
_maxy = -999999e111;

zone\pathing.cpp, line 549-550
Quote:

best_dist2 = 9999999e111;
bestl_dist2 = 9999999e111;

The easy quick solution is to change all of these to something smaller. The better solution is probably using something like this:

Quote:

#ifdef WIN32
#DEFINE MAXFLOAT 999e10
#else
#DEFINE MAXFLOAT 999e100
#endif
...but I don't really know if this problem exists in all Windows based compilers or just Visual Studio.

LethalEncounter 04-23-2005 01:07 PM

If anyone is still having this problem:

1. Open client.h and find ClearAllProximities()
2. Change all the 1000e99 on that line to FLT_MAX.
3. Add #include <float.h> to the top of the file.

This should fix the vast majority of the "costant too large" messages. Any other errors should be easy to identify and fix, the reason why this instance was hard to find was because VS .Net would say the error was at a seemingly random location instead of the real location. Compounding this was the fact that about 30 files include client.h, making it seem like you had a ton of errors when it was really just one.

RangerDown 04-23-2005 02:13 PM

Thanks Lethal!!

You're dropping the Edgar1898 handle I see :(


All times are GMT -4. The time now is 11:59 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.