• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
clear/empty an array
#1
hi!
i wanted to know is there anyway to clear an array with only a few lines? i have player info in this array:
Code:
enum e_playerinfo {     someInt,     Float:someFloat,     someString[144], } new playerInfo[MAX_PLAYERS][e_playerinfo];


and i wanted to know how can i clear it in on player disconnect after saving the values in sql, i used to do like this:
Code:
public OnPlayerDisconnect(...) {     playerInfo[playerid][...] = 0;     playerInfo[playerid][...] = 0.0;     playerInfo[playerid][...] = "";     ... }
and i had to do this for every variable i add, is there anyway to make this more simple?
  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