fcopy , stripnewline , frename HELP!! - 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)
+--- Thread: fcopy , stripnewline , frename HELP!! (
/showthread.php?tid=524350)
fcopy , stripnewline , frename HELP!! -
Fachrul48 - 06.07.2014
yeah bro to the point i got this error messages!
Код:
D:\GGRP\gamemodes\ggrpcityhall.pwn(6180) : error 021: symbol already defined: "fcopy"
D:\GGRP\gamemodes\ggrpcityhall.pwn(6198) : error 021: symbol already defined: "StripNewLine"
D:\GGRP\gamemodes\ggrpcityhall.pwn(6209) : error 021: symbol already defined: "frename"
And This is the line
Код:
stock fcopy(oldname[],newname[])
{
new File:ohnd,File:nhnd;
if (!fexist(oldname))
{
return 0;
}
ohnd=fopen(oldname,io_read);
nhnd=fopen(newname,io_write);
new buf2[1];
for (new i=flength(ohnd);i>0;i--)
{
fputchar(nhnd, fgetchar(ohnd, buf2[0],false),false);
}
fclose(ohnd);
fclose(nhnd);
return 1;
}
stock StripNewLine(string[])
{
new len = strlen(string);
if (string[0]==0) return ;
if ((string[len - 1] == '\n') || (string[len - 1] == '\r'))
{
string[len - 1] = 0;
if (string[0]==0) return ;
if ((string[len - 2] == '\n') || (string[len - 2] == '\r')) string[len - 2] = 0;
}
}
stock frename(oldname[],newname[])
{
if(!fexist(oldname)) return false;
new string[255], File:old, File:neww;
old = fopen(oldname, io_read);
neww = fopen(newname, io_write);
while(fread(old, string)){
StripNewLine(string);
format(string,sizeof(string),"%s\r\n",string);
fwrite(neww, string);
}
fclose(old);
fclose(neww);
fremove(oldname);
return true;
}
Anybody Help Me Please
Re: fcopy , stripnewline , frename HELP!! -
doreto - 06.07.2014
... error 021:
symbol already defined ...
You already have them.Just remove them.
Re: fcopy , stripnewline , frename HELP!! -
Fachrul48 - 06.07.2014
its work now !
thanks to you !!