04.02.2014, 06:04
Im getting these errors and idk why, The code is being used and is defined
Example of it being used ===>
PLEASE HELP i'll ++REP you
Код:
C:\Users\Adrian\Desktop\SA-MP Scripting Files\Vitality Gaming Roleplay\gamemodes\VGRP.pwn(22642) : warning 219: local variable "logfile" shadows a variable at a preceding level C:\Users\Adrian\Desktop\SA-MP Scripting Files\Vitality Gaming Roleplay\gamemodes\VGRP.pwn(124114) : warning 203: symbol is never used: "logfile"
pawn Код:
stock Log(sz_fileName[], sz_input[]) {
new
sz_logEntry[180],
File: logfile,
i_dateTime[2][3];
gettime(i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2]);
getdate(i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2]);
format(sz_logEntry, sizeof(sz_logEntry), "[%i/%i/%i - %i:%02i:%02i] %s\r\n", i_dateTime[1][0], i_dateTime[1][1], i_dateTime[1][2], i_dateTime[0][0], i_dateTime[0][1], i_dateTime[0][2], sz_input);
if(logfile) fclose(logfile);
if(!fexist(sz_fileName)) logfile = fopen(sz_fileName, io_write);
else logfile = fopen(sz_fileName, io_append);
if(logfile)
{
fwrite(logfile, sz_logEntry);
fclose(logfile);
}
return 1;
}
pawn Код:
new File:logfile; // global variable for buffer overflow protection
pawn Код:
Log("logs/adminpay.log", string);