30.05.2015, 13:51
Errors
HELP PLEASE!
Код:
D:\San Andreas Life Roleplay\gamemodes\SAL-RP_script.PWN(340) : error 010: invalid function or declaration D:\San Andreas Life Roleplay\gamemodes\SAL-RP_script.PWN(11900) : error 017: undefined symbol "ini_CurrentFile" D:\San Andreas Life Roleplay\gamemodes\SAL-RP_script.PWN(11901) : error 017: undefined symbol "ini_CurrentFile" D:\San Andreas Life Roleplay\gamemodes\SAL-RP_script.PWN(11930) : error 017: undefined symbol "ini_CurrentFile" D:\San Andreas Life Roleplay\gamemodes\SAL-RP_script.PWN(11937) : error 017: undefined symbol "ini_CurrentFile" D:\San Andreas Life Roleplay\gamemodes\SAL-RP_script.PWN(11939) : error 017: undefined symbol "ini_Temp" D:\San Andreas Life Roleplay\gamemodes\SAL-RP_script.PWN(11941) : error 017: undefined symbol "ini_Temp" D:\San Andreas Life Roleplay\gamemodes\SAL-RP_script.PWN(11944) : error 017: undefined symbol "ini_Temp" D:\San Andreas Life Roleplay\gamemodes\SAL-RP_script.PWN(11948) : error 017: undefined symbol "ini_KeyData" D:\San Andreas Life Roleplay\gamemodes\SAL-RP_script.PWN(11948) : error 029: invalid expression, assumed zero D:\San Andreas Life Roleplay\gamemodes\SAL-RP_script.PWN(11948) : error 029: invalid expression, assumed zero D:\San Andreas Life Roleplay\gamemodes\SAL-RP_script.PWN(11948) : fatal error 107: too many error messages on one line
PHP код:
#define MAX_TIME_TO_WAIT 20000 //Max time to wait 20"
#define __isnull(%0) (%0[0] == 0||(%0[0] == 1&&%0[1] == 0))
#define __strcpy(%0,%1,%2) strcat((%0[0] = '\0', %0), %1, %2)
#define file_IncVal(%1,%2) file_SetVal(%1, file_GetVal(%1) + %2)
File: ini_CurrentFile, // 340
ini_Temp[MAX_RECORD_LENGTH],
ini_OsLineEndLen = 2,
ini_OsLineEndChar[5],
bool: ini_FileOpen,
ini_KeyData[MAX_RECORDS][MAX_KEY_LENGTH],
ini_ValData[MAX_RECORDS][MAX_VAL_LENGTH];
PHP код:
stock file_Create(filename[])
{
if(fexist(filename))
{
printf("ERROR CREATING FILE : '%s' : FILE ALREADY EXISTS", filename);
return 0;
}
ini_CurrentFile = fopen(filename, io_write); // 11930
fclose(ini_CurrentFile); // 11931
return 1;
}
stock file_Delete(filename[])
{
fremove(filename);
return 1;
}
/*==============================================================================
Open and Close
==============================================================================*/
stock file_Open(filename[])
{
if(!fexist(filename))
{
printf("ERROR: file_Open: File '%s' not found.", filename);
return 0;
}
else
{
ini_CurrentFile = fopen(filename, io_read); // 11930
}
new
i,
delim;
while(fread(ini_CurrentFile, ini_Temp) && (i < MAX_RECORDS)) // 11937
{
if(strlen(ini_Temp) && strfind(ini_Temp, ini_OsLineEndChar) != -1) // 11939
{
strdel(ini_Temp, strlen(ini_Temp) - ini_OsLineEndLen, strlen(ini_Temp)); // 11941
}
delim = strfind(ini_Temp, "="); // 11944
if(delim != -1)
{
__strcpy(ini_KeyData[i], ini_Temp, delim + 1); // 11948
__strcpy(ini_ValData[i], ini_Temp[delim + 1], MAX_VAL_LENGTH);