Using sh_vector.h / CVector in a SourceMod extension
I'm currently working on a SourceMod extension that currently uses Valve's CUtlVector. However, I'm actually copying some code from another extension file that already uses CVector from sh_vector.h, so I was looking to convert over to it.
My project is using the SourceMod sample extension from 1.3.7's source code. When I try to compile the project in Visual Studio 2008, I have a slight problem. The problem I'm having is this. On this line: Code:
CVector<unsigned int> m_Votes; Quote:
Code:
#include <sh_vector.h> Code:
#include "sh_vector.h" What am I doing wrong here? |
Re: Using sh_vector.h / CVector in a SourceMod extension
Hmm,
(1) Are there any other errors? (2) What is the line right before the line you posted? (3) CVector is in namespace SourceHook. Try Code:
SourceHook::CVector<unsigned int> m_Votes; Code:
using namespace SourceHook; Greetings, PM |
Re: Using sh_vector.h / CVector in a SourceMod extension
Quote:
That seems to have mostly worked, but now I get a new error that I can only define as "strange" in sh_vector.h: Code:
Error 1 error C2065: 'NULL' : undeclared identifier d:\tf2server\dev\sourcemm\core\sourcehook\sh_vector.h 80 1 sdk |
Re: Using sh_vector.h / CVector in a SourceMod extension
What is your #include order? Try including sh_vector.h later (in C++, NULL is not a language keyword, some header #defines NULL (0) or something like that).
|
Re: Using sh_vector.h / CVector in a SourceMod extension
Quote:
|
All times are GMT -4. The time now is 05:58. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.