Enumerations again - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Enumerations again (
/showthread.php?tid=230845)
Enumerations again -
deather - 24.02.2011
Forgive me if this is so dumb. But can I reset an enum? Like remove the empty the strings in an etc?
Re: Enumerations again -
CyNiC - 24.02.2011
Try it:
pawn Код:
for(new i = 0; enumtaghere:i < enumtaghere; ++i)
{
yourarray[enumtaghere:i] = '\0';
}
Re: Enumerations again -
deather - 24.02.2011
Код:
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.
Re: Enumerations again -
CyNiC - 24.02.2011
Try:
pawn Код:
for(new j = 0; j < sizeof CtInfo; ++j)
{
for(new i = 0; CData:i < CData; ++i)
{
CtInfo[j][CData:i] = '\0';
}
}