01.10.2016, 16:17
Quote:
Essas static e pra ser resetada toda vez que for usada?
Code:
static bool:CaseSensitive = true; static DB:Database, DBResult:Resultado; new AntiTAG[MAX_ITENS][10], AntiNick[MAX_ITENS][MAX_PLAYER_NAME], AntiParteNick[MAX_ITENS][MAX_PLAYER_NAME], AntiPalavra[MAX_ITENS][20], AntiChar[MAX_ITENS][2]; static RowsAntiTAG, RowsAntiParteNick, RowsAntiNick, RowsAntiPalavra, RowsAntiChar; static String[128]; |
PHP Code:
global static
Global static variables are like normal globals but can only be used in the file in which they are declared:
File1:
static
gsMyVar = 4;
MyFunc()
{
printf("%d", gsMyVar);
}
#include "File2"
File2:
MyFunc2()
{
// This is wrong as gsMyVar doesn't exist here
printf("%d", gsMyVar);
}
Boa include,