Raised This Month: $12 Target: $400
 3% 

enum: integer to mytype


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hnorgist
Junior Member
Join Date: Feb 2009
Location: Russia, Vladivostok
Old 02-28-2009 , 05:16   enum: integer to mytype
Reply With Quote #1

my code:
Code:
...
// Identify type
enum IDType{ idtypeSteamid = 1, idtypeIp, idtypeName }
...
new IDType:g_MATCH_eIdentifyBy; // Identify entering players by ip/name/steamid/...
...
g_MATCH_eIdentifyBy = SQL_ReadResult( query, 9 );
...
Compilator says tag mismatch, which is obvious, because IDType is not integer. How can i make type conversion

Last edited by hnorgist; 02-28-2009 at 05:18.
hnorgist is offline
Fyren
FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren FyrenFyrenFyrenFyrenFyren
Join Date: Feb 2106
Old 02-28-2009 , 05:19   Re: enum: integer to mytype
Reply With Quote #2

g_MATCH_eIdentifyBy = IDType:SQL_ReadResult(query, 9);
Fyren is offline
hnorgist
Junior Member
Join Date: Feb 2009
Location: Russia, Vladivostok
Old 02-28-2009 , 05:24   Re: enum: integer to mytype
Reply With Quote #3

thx, works
it's just my first plugin, and I'm not the best friend with syntax yet.
hnorgist is offline
Reply


Thread Tools
Display Modes

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 04:18.


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