• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
clear/empty an array
#4
(2021-07-31, 05:09 PM)redex Wrote:
(2021-07-31, 03:53 PM)Pinch Wrote: I think that this should work:



Code:
for(new i; e_playerinfo:i < e_playerinfo; i) { playerInfo[playerid][e_playerinfo:i] = -1; }



so it will work for any data type?

i want it to make the strings "", and ints 0, i think this is not working for every datatype

me neither, but what you can do is manually reset strings, you shouldn't have that much of them anyways?
Using Pawn.CMD?

If you're doing so, this is the very first sign that you absolutely shouldn't utilize your all powerful P-Code knowledge in any of the scripting discussion topics.
  Reply


Messages In This Thread
clear/empty an array - by redex - 2021-07-31, 01:21 PM
RE: clear/empty an array - by Pinch - 2021-07-31, 03:53 PM
RE: clear/empty an array - by redex - 2021-07-31, 05:09 PM
RE: clear/empty an array - by Pinch - 2021-07-31, 07:33 PM
RE: clear/empty an array - by Banditul - 2021-07-31, 08:20 PM
RE: clear/empty an array - by Pinch - 2021-08-01, 12:22 PM
RE: clear/empty an array - by redex - 2021-08-02, 05:29 PM

Forum Jump: