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(usercfg, line, linetext, 256, linetextlength)))
{
if(linetext[0] == ';')
{
continue
}
menu_additem(menu, linetext, line, ADMIN_KICK); //this is the error
}
}
Than i have another error:
PHP Code:
must be a constant expression; assumed 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(0, print_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? :/
__________________