Raised This Month: $ Target: $400
 0% 

new const need help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 09-29-2012 , 12:25   Re: new const need help
Reply With Quote #2

try instead of making MAX_ITEM_TYPE a define. make it a global var and give it a value in plugin_init upon compilation.
As such....

PHP Code:
new MAX_ITEM_TYPE

new const item_name[][] =
{
    
"a",
    
"b",
    
"c"
}

public 
plugin_init()
    
MAX_ITEM_TYPE sizeof(item_name
Also make sure that the last item in an array DOES NOT have a comma after it. And everything that is supposed to be a string is inside quotes. I corrected the first array as an example. You do the rest.
__________________
What an elegant solution to a problem that doesn't need solving....

Last edited by Liverwiz; 09-29-2012 at 12:47.
Liverwiz 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 08:19.


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