Help with: /myhouses command.
#9

Looking at your code, I believe the "ID" in database is used as index for HouseData array. This isn't the best thing if you use auto increment as it could go out of bounds.

Anyway, the loop in that case is not needed at all:
pawn Код:
case DIALOG_HOUSES_TELEPORT:
{
    if (response)
    {
        new message[40 + MAX_HOUSE_NAME], house_ID;

        house_ID = PlayerInfo[playerid][Momentan_House_ID] = strval(inputtext);

        format(message, sizeof(message), "{FFFFFF}%s (ID: {C0C0C0}%d {FFFFFF}):", HouseData[house_ID][Name], house_ID);
        ShowPlayerDialog(playerid, DIALOG_HOUSES_TELEPORT_2, DIALOG_STYLE_LIST, message, "{FFFFFF}Teleport to House", "Select", "Back");

    }
}
and don't create local strings with 7000 size as run time 3 is in the door.
Reply


Messages In This Thread
Help with: /myhouses command. - by FaLLenGirL - 31.12.2016, 21:47
Re: Help with: /myhouses command. - by Konstantinos - 31.12.2016, 22:45
Re: Help with: /myhouses command. - by FaLLenGirL - 31.12.2016, 23:19
Re: Help with: /myhouses command. - by FaLLenGirL - 01.01.2017, 08:51
Re: Help with: /myhouses command. - by Konstantinos - 01.01.2017, 10:40
Re: Help with: /myhouses command. - by FaLLenGirL - 01.01.2017, 11:03
Re: Help with: /myhouses command. - by Konstantinos - 01.01.2017, 11:05
Re: Help with: /myhouses command. - by FaLLenGirL - 01.01.2017, 11:13
Re: Help with: /myhouses command. - by Konstantinos - 01.01.2017, 11:26
Re: Help with: /myhouses command. - by FaLLenGirL - 01.01.2017, 13:07

Forum Jump:


Users browsing this thread: 1 Guest(s)