Strings overlap eachother.
#9

@vassilis - This:

pawn Код:
#define strcpy(%0,%1,%2) strcat((%0[0] = '\0', %0), %1, %2)

stock ResetInventory(playerid)
{
    for(new b = 26; b <= 53; b ++)
    {
        strcpy(InventoryInfo[playerid][invtext][b], "None", 5);
    }
    return 1;
}
Is the same as:

pawn Код:
stock ResetInventory(playerid)
{
    for(new b = 26; b <= 53; b ++)
    {
        InventoryInfo[playerid][invtext][b][0] = EOS;
        strcat(InventoryInfo[playerid][invtext][b], "None", 5);
    }
    return 1;
}
You shouldn't be going around looking for other methods if you cannot even get this one to work. And the above is pretty much what you would want to go with.
Reply


Messages In This Thread
Strings overlap eachother. - by justinnater - 11.12.2015, 13:39
Re: Strings overlap eachother. - by vassilis - 11.12.2015, 13:42
Re: Strings overlap eachother. - by justinnater - 11.12.2015, 13:44
Re: Strings overlap eachother. - by vassilis - 11.12.2015, 13:48
Re: Strings overlap eachother. - by justinnater - 11.12.2015, 13:55
Re: Strings overlap eachother. - by vassilis - 11.12.2015, 14:28
Re: Strings overlap eachother. - by Vince - 11.12.2015, 14:43
Re: Strings overlap eachother. - by vassilis - 11.12.2015, 14:45
Re: Strings overlap eachother. - by SickAttack - 11.12.2015, 14:52
Re: Strings overlap eachother. - by justinnater - 11.12.2015, 14:53

Forum Jump:


Users browsing this thread: 1 Guest(s)