it takes the ID as the price!?
#4

Quote:
Originally Posted by Don_Cage
Посмотреть сообщение
I didn't want any suggestions. I wanted an awnser on my question. I know zcmd is easier but I don't want to re-make all my cmds into zcmd and sscanf
Using ZCMD would make it a lot clearer and easier to understand why it isnt working.

Anyway, it looks like you have only used strtok once on the variable tmp and you are using that for both the playerid and price. I don't exactly know how strtok works, but that looks like it is the cause of the problem.

Код:
tmp = strtok(cmdtext, idx);
            if(!strlen(tmp))
            {
                SCM(playerid, COLOR_GRAD1, "USAGE: /sellhouseto [playerid/PartOfName] [price]");
                return 1;
            }
            giveplayerid = ReturnUser(tmp);
            if(giveplayerid != INVALID_PLAYER_ID)
            {
                if(!strlen(tmp))
                {
                    SCM(playerid, COLOR_GRAD1, "USAGE: /sellhouseto [playerid/PartOfName] [price]");
                    return 1;
                }
                new price,house;
                GetPlayerName(giveplayerid, giveplayer, sizeof(giveplayer));
                house = PlayerInfo[playerid][pHouseKey];
                price = strval(tmp); 
Reply


Messages In This Thread
it takes the ID as the price!? - by Don_Cage - 15.07.2014, 20:22
Re: it takes the ID as the price!? - by kamiliuxliuxliux - 15.07.2014, 22:00
Re: it takes the ID as the price!? - by Don_Cage - 15.07.2014, 22:05
Re: it takes the ID as the price!? - by BlackSirrah239 - 16.07.2014, 01:16
Re: it takes the ID as the price!? - by admiralspeedy - 16.07.2014, 05:22
Re: it takes the ID as the price!? - by R0 - 16.07.2014, 12:29
Re: it takes the ID as the price!? - by Don_Cage - 16.07.2014, 21:45

Forum Jump:


Users browsing this thread: 1 Guest(s)