storing string into varialbe issue, help
#5

1. error
pawn Код:
new text[64],string[50];
storedforcedmode = string[64];
2. if you are going to use storedforcedmode as text you will need it storedforcedmode[64];

And use
strmid(storedforcedmode,string,0,strlen(string),25 5);
not
storedforcedmode = string[64];
because we not talking about integers

whole edit:
pawn Код:
forward forcedtochange(playerid);
new storedforcedmode[50];

COMMAND:forcemode(playerid, params[])
{
    if (PlayerInfo[playerid][pAdminLevel] >=3)
    {
        new text[40],string[50];
        if (sscanf(params, "s[64]",text))
        {
            SendClientMessage(playerid, COLOR_GOLD, "Usage: /forcemode <modename>"); return 1;
        }
        format(string, sizeof(string), "changemode %s",text);
        strmid(storedforcedmode,string,0,strlen(string),255);
        SetTimer("forcedtochange", 535000,0);
    }
    return 1;
}
public forcedtochange(playerid)
{
    SendRconCommand(storedforcedmode);
    return 1;
}
Reply


Messages In This Thread
storing string into varialbe issue, help - by Hijolion - 04.10.2010, 22:51
Re: storing string into varialbe issue, help - by LarzI - 04.10.2010, 23:53
Re: storing string into varialbe issue, help - by samgreen - 05.10.2010, 00:00
Re: storing string into varialbe issue, help - by Hijolion - 06.10.2010, 00:18
Re: storing string into varialbe issue, help - by Voldemort - 06.10.2010, 06:03
Re: storing string into varialbe issue, help - by LarzI - 06.10.2010, 08:10
Re: storing string into varialbe issue, help - by Hijolion - 06.10.2010, 23:35

Forum Jump:


Users browsing this thread: 1 Guest(s)