Raised This Month: $32 Target: $400
 8% 

Some errors


Post New Thread Reply   
 
Thread Tools Display Modes
Keeper
Senior Member
Join Date: Nov 2006
Old 02-06-2009 , 16:58   Re: Some errors
Reply With Quote #21

Ok, I have both in mine. Try removing the #include "baseentity.h" and putting back the #include "cbase.h"
Keeper is offline
DHJ
Member
Join Date: Feb 2007
Old 02-06-2009 , 17:01   Re: Some errors
Reply With Quote #22

think it gaves me the same erros as before
Code:
1>.\serverplugin_empty.cpp(36) : error C2371: 'gameeventmanager' : redefinition; different basic types
1>        c:\skinbyscore\src\dlls\enginecallback.h(43) : see declaration of 'gameeventmanager'
1>.\serverplugin_empty.cpp(52) : error C2084: function 'bool FStrEq(const char *,const char *)' already has a body
1>        c:\skinbyscore\src\dlls\util.h(173) : see previous definition of 'FStrEq'
1>.\serverplugin_empty.cpp(130) : error C2440: '=' : cannot convert from 'IGameEventManager *' to 'IGameEventManager2 *'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\serverplugin_empty.cpp(155) : error C2664: 'IGameEventManager2::RemoveListener' : cannot convert parameter 1 from 'CEmptyServerPlugin *const ' to 'IGameEventListener2 *'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
1>.\serverplugin_empty.cpp(186) : error C2660: 'IGameEventManager2::AddListener' : function does not take 2 arguments
1>.\serverplugin_empty.cpp(214) : error C2664: 'IGameEventManager2::RemoveListener' : cannot convert parameter 1 from 'CEmptyServerPlugin *const ' to 'IGameEventListener2 *'
1>        Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
DHJ is offline
Keeper
Senior Member
Join Date: Nov 2006
Old 02-06-2009 , 17:08   Re: Some errors
Reply With Quote #23

Allright, I think with defining the cbase.h, you don't have to write the code for FStrEq, I would comment out that section in your code.

As far as the other error, evidently, there's something else called "gameeventmanager" defined in the sdk that gets loaded when you include the cbase.h. You could try to rename your gameeventmanager to g_gameeventmanager to see if that will fix it.
Keeper is offline
DHJ
Member
Join Date: Feb 2007
Old 02-06-2009 , 17:20   Re: Some errors
Reply With Quote #24

seems to work, with only include "cbase.h"

try it now, thx
DHJ is offline
DHJ
Member
Join Date: Feb 2007
Old 02-06-2009 , 17:21   Re: Some errors
Reply With Quote #25

btw will this return in float?
Code:
float format_ratio = userkills / userdeaths;
userkills and userdeaths is int
DHJ is offline
L. Duke
Veteran Member
Join Date: Apr 2005
Location: Walla Walla
Old 02-06-2009 , 19:02   Re: Some errors
Reply With Quote #26

You might want to try
float format_ratio = (float) userkills / (float) userdeaths;
__________________
"Good grammar is essential, Robin."
- Batman
L. Duke is offline
DHJ
Member
Join Date: Feb 2007
Old 02-06-2009 , 19:08   Re: Some errors
Reply With Quote #27

it crash if deaths is 0

how can i avoid this from happin?, like set deaths to 1, if deaths is 0, then the ratio would be the number of kills
DHJ is offline
Reply



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


All times are GMT -4. The time now is 13:39.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode