Raised This Month: $ Target: $400
 0% 

Menuitems from ini


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Silent9681
Member
Join Date: Jan 2012
Location: Hungary
Old 07-07-2012 , 15:03   Menuitems from ini
Reply With Quote #1

Hi. I want a plugin, that makes a menu with items from an ini file. So I have an ini file like this:

PHP Code:
MenuItem1
MenuItem2
MenuItem3
andsoon 
And the menuitems will be MenuItem1, MenuItem2 and MenuItem3.

I've tried to make it, but i've an error:

PHP Code:
argument type mismatch (argument 3
My piece of code:

PHP Code:
        if (file_exists(usercfg))
        {
                while ((
line read_file(usercfglinelinetext256linetextlength)))
                {
                        if(
linetext[0] == ';')
                        {
                                continue
                        }
                        
menu_additem(menulinetextlineADMIN_KICK); //this is the error
                
}
        } 

Than i have another error:

PHP Code:
must be a constant expressionassumed zero 
And this is another piece of code:

PHP Code:
    switch(key)
    {
        case 
line//this is the error
        
{
            
client_cmd(0"mp3 play sound/silent_productions/admin_musics/%s.mp3"linetext);
            
client_print(0print_chat"%s zene admin altal elinditva"linetext);
        }
    }
    return 
1
Thank you in advance, sry for my bad english.

Edit:
realised that the 3rd param needs a string, but will this solve the second error too? :/
__________________
Sorry for my bad english
Hungarian/Magyar forum:
http://amxmodx.crys.hu/site/forum/

Last edited by Silent9681; 07-07-2012 at 15:32. Reason: Wrong title :)
Silent9681 is offline
Send a message via MSN to Silent9681
 


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


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