Enumerations again
#1

Forgive me if this is so dumb. But can I reset an enum? Like remove the empty the strings in an etc?
Reply
#2

Try it:
pawn Код:
for(new i = 0; enumtaghere:i < enumtaghere; ++i)
{    
    yourarray[enumtaghere:i] = '\0';    
}
Reply
#3

Код:
enum CData
{
	Name[24],
	UdStr[128]
};
new CtInfo[MAX_DATA][CData];
This is my enum. I format the strings in the enum to store data using a function. And after my job is done how will I empty it so that I can use those memory for some other strings? Also I want to format the string inside the enum again when I call the function.
Reply
#4

Try:
pawn Код:
for(new j = 0; j < sizeof CtInfo; ++j)
{
    for(new i = 0; CData:i < CData; ++i)
    {    
        CtInfo[j][CData:i] = '\0';    
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)