Raised This Month: $ Target: $400
 0% 

Trouble using sizeof with a string inside an enum


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Marcus_Brown001
AlliedModders Donor
Join Date: Nov 2012
Location: Illinois, United States
Old 09-26-2014 , 12:06   Trouble using sizeof with a string inside an enum
Reply With Quote #1

As the title says. This is the example:
PHP Code:
#include <sourcemod>

enum SomeEnum
{
    
String:sSomeString[32]
};

new 
g_eTesting[MAXPLAYERS 1][SomeEnum];

public 
OnClientConnected(iClient)
{
    
FormatEx(g_eTesting[iClient][sSomeString], sizeof(g_eTesting[iClient][sSomeString][]), "Test String");

I originally tried doing this a couple of weeks ago, and I couldn't figure out a way to do it. I just resorted to manually filling in the string sizes. I am just curious if this is possible and what I am doing wrong. Any input is appreciated.
Marcus_Brown001 is offline
 



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:08.


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