Making a add song command
#6

Quote:
Originally Posted by ricardo178
Посмотреть сообщение
You said you know how to do it lol...
By the way using dini is something like:
pawn Код:
CMD:savesong(playerid, params[])
{
    new musicname[128], link[128];
    if(!sscanf(params, "s[128]s[128]", musicname, link))
    {
        format(file, sizeof(file), "music/musics.ini");
        if(fexist(file))
        {
            dini_Set(file, "%s %s", musicname, link);
        }
        return 1;
    }
    else return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /savesong [Song Name] [Song Link]");
}
Didn't really test it and i am not sure if it's right done..
i want it so it can be done like this with out zcmd or what ever its called.

Quote:

if (strcmp("/savesong", cmdtext, true, 10) == 0)
{
new musicname[128], link[128];
if(!sscanf(params, "s[128]s[128]", musicname, link))
{
format(file, sizeof(file), "music/musics.ini");
if(fexist(file))
{
dini_Set(file, "%s %s", musicname, link);
}
return 1;
}
else return SendClientMessage(playerid, 0xFFFFFFFF, "Usage: /savesong [Song Name] [Song Link]");
}

but when i do that and compile i get these errors

Quote:

C:\Users\Desktop\New folder\pawno\rp.pwn(2642) : error 017: undefined symbol "params"
C:\Users\Desktop\New folder\pawno\rp.pwn(2644) : error 017: undefined symbol "file"
C:\Users\Desktop\New folder\pawno\rp.pwn(2644) : error 017: undefined symbol "file"
C:\Users\Desktop\New folder\pawno\rp.pwn(2644) : error 029: invalid expression, assumed zero
C:\Users\Desktop\New folder\pawno\rp.pwn(2644) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


5 Errors.

thanks for help tho.
Reply


Messages In This Thread
Making a add song command - by jueix - 17.02.2012, 11:48
Re : Making a add song command - by ricardo178 - 17.02.2012, 12:07
Re: Re : Making a add song command - by jueix - 17.02.2012, 12:27
Re : Making a add song command - by ricardo178 - 17.02.2012, 12:34
Re: Making a add song command - by Madd Kat - 17.02.2012, 12:36
Re: Re : Making a add song command - by jueix - 17.02.2012, 12:48

Forum Jump:


Users browsing this thread: 2 Guest(s)