Reset structured array with integer/float/string fields
#4

Quote:
Originally Posted by Zeex_
Посмотреть сообщение
With my amx_memory include you can do it this way:

pawn Код:
stock ZeroMemory(addr, size) {
    for (new i = 0; i < size; i++) {
        w@(addr + i*4, 0);
    }
}

// Usage:
ZeroMemory(ref(myArray[playerid]), _:myStructure);
Nice one. Never knew it existed.
Reply


Messages In This Thread
Reset structured array with integer/float/string fields - by Programie - 04.03.2012, 15:21
Re: Reset structured array with integer/float/string fields - by T0pAz - 04.03.2012, 15:33
Re: Reset structured array with integer/float/string fields - by Zeex_ - 04.03.2012, 15:48
Re: Reset structured array with integer/float/string fields - by T0pAz - 04.03.2012, 15:52
Re: Reset structured array with integer/float/string fields - by Programie - 04.03.2012, 16:01
Re: Reset structured array with integer/float/string fields - by Jefff - 04.03.2012, 22:50
Re: Reset structured array with integer/float/string fields - by Programie - 05.03.2012, 00:02

Forum Jump:


Users browsing this thread: 1 Guest(s)