Raised This Month: $ Target: $400
 0% 

Need Assistance


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Leapor
Junior Member
Join Date: Apr 2005
Location: Sydney, Australia
Old 04-22-2005 , 10:17   Need Assistance
Reply With Quote #1

Hay have a problem with a few things so there will be lots of need help post's in here

firstly i only just need to get my array.h file working

i keep getting constant errors on this
Code:
public:     float_s(){ isFree = false;}     std::vector;<REAL> v;     ~float_s() { v.clear(); }     bool isFree;     void reset() {         z = v.begin();

The Errors im getting are
Code:
error C2039: 'vector' : is not a member of 'std'
error C2501: 'float_s::vector' : missing storage-class or type specifiers
 error C2059: syntax error : '<'
error C2238: unexpected token(s) preceding ';'
We'll just start with these errors for the time
Leapor is offline
Send a message via MSN to Leapor
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 04-22-2005 , 14:08  
Reply With Quote #2

Are you sure this is the Small scripting language? ;-)
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX is offline
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 04-22-2005 , 16:16  
Reply With Quote #3

Looks like C++ to me, are you writing a module?

Either way, you std::vector syntax is wrong.. looks like you want:

Code:
std::vector<REAL> v;
Reference here: std::vector
xeroblood is offline
Send a message via MSN to xeroblood
Leapor
Junior Member
Join Date: Apr 2005
Location: Sydney, Australia
Old 04-23-2005 , 00:49  
Reply With Quote #4

I cant get it to work

Code:
std::vector<REAL> v;

i went to that website and it said alot of different stuff...but not what im looking for...

this is the code im using (the bottom part of the code is the error part)
Code:
#include "extdll.h" #include <string.h> #include <stdarg.h> #include <stdio.h> #include <cstdlib> #include <string> #include "vector.h" #include <list> #include <map> #include "adminxxmodule.h" #define destroy(x) if(x){delete(x);x=0;} #define destarr(x) if(x){delete[]x;x=0;} using namespace std; typedef std::map<std::string,std::string> keytab; enum {     list_int=1,     list_float,     list_string, }; enum {     a_shift=1,     a_unshift,     a_pop,     a_push,     a_n, }; class map_t { public:     map_t(){ isFree = false;}     keytab v;     ~map_t() { v.clear(); }     bool isFree;     void reset() {         z = v.begin();     }     int next() {         if (z == v.end() || ++z == v.end()) {             return 0;         }         return 1;     }     std::string key()     {         return z->first;     }     std::string val()     {         return z->second;     } private:     keytab::iterator z; }; class float_s { public:     float_s(){ isFree = false;}     std::vector<REAL> v     ~float_s() { v.clear(); }     bool isFree;     void reset() {         z = v.begin();     }     int next() {         if (z == v.end() || ++z == v.end()) {             return 0;         }         return 1;     }     REAL iter()     {         return *z;     } private:     std::vector<REAL>::iterator z; };

Error's im getting
Code:
array.h(67) : error C2039: 'vector' : is not a member of 'std'
array.h(67) : error C2501: 'float_s::vector' : missing storage-class or type specifiers
array.h(67) : error C2059: syntax error : '<'
array.h(67) : error C2238: unexpected token(s) preceding ';'
array.h(68) : error C2334: unexpected token(s) preceding '{'; skipping apparent function body
array.h(84) : error C2039: 'vector' : is not a member of 'std'
array.h(84) : error C2143: syntax error : missing ';' before '<'
array.h(84) : error C2501: 'float_s::vector' : missing storage-class or type specifiers
array.h(84) : error C2955: 'std::iterator' : use of class template requires template argument list
xutility(66) : see declaration of 'std::iterator'
array.h(84) : error C2238: unexpected token(s) preceding ';
Leapor is offline
Send a message via MSN to Leapor
NiGHTFiRE
Senior Member
Join Date: Dec 2004
Location: Sweden
Old 04-23-2005 , 02:50  
Reply With Quote #5

Are you making a module or trying to make a plugin? Because if you are trying to make a plugin you are making it all wrong. The script language you are writing in is C++(duh) and the amxx language is Small
NiGHTFiRE is offline
Send a message via AIM to NiGHTFiRE Send a message via MSN to NiGHTFiRE
n0obie4life
Veteran Member
Join Date: Dec 2004
Old 04-23-2005 , 03:29  
Reply With Quote #6

lol....C+...
n0obie4life is offline
Leapor
Junior Member
Join Date: Apr 2005
Location: Sydney, Australia
Old 04-23-2005 , 05:30  
Reply With Quote #7

Making a module

Can you just help me fix this error..i would greatly appreciate the help...and yes i am well aware it is not small and that it is C++...i just thought you guys could give me a hand
Leapor is offline
Send a message via MSN to Leapor
XxAvalanchexX
Veteran Member
Join Date: Oct 2004
Location: abort73.com
Old 04-23-2005 , 12:17  
Reply With Quote #8

Quote:
Originally Posted by Leapor
i just thought you guys could give me a hand
Nope!

You're going to find a lot of Small programmers in the Scripting Help forum and barely any C++ programmers here. Post your problem in the Modules forums.
__________________
No longer around. Thanks your support, everyone! As always:
THIS ONES FOR YOU
3000 PTS
XxAvalanchexX 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 09:54.


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