Raised This Month: $ Target: $400
 0% 

new const need help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
manfailui
Member
Join Date: Jun 2012
Location: Hong Kong
Old 09-29-2012 , 12:31   Re: new const need help
Reply With Quote #3

Quote:
Originally Posted by Liverwiz View Post
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[MAX_ITEM_TYPE][] =
{
    
"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.
ok thank you first..i try later
manfailui 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