Strcpy problem - 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: Strcpy problem (
/showthread.php?tid=361804)
Strcpy problem -
sampmark05 - 22.07.2012
WTF! is this?
C:\Documents and Settings\Mark&Matt\My Documents\Downloads\SAMP\Next Revolution Roleplay\gamemodes\NRRP_main.pwn(623) : warning 201: redefinition of constant/macro (symbol "strcpy(%0,%1,%2)")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
I dunno what's the problem on my script.
Line 623
Код:
// strcpy - Simon / ******
#define strcpy(%0,%1,%2) \
strcat((%0[0] = '\0', %0), %1, %2)
Re: Strcpy problem -
[ABK]Antonio - 22.07.2012
It means that it has already been defined (there's another definition some where).
Re: Strcpy problem -
sampmark05 - 22.07.2012
But i searched for 3 hours but that's the only strcpy in my script.
Re: Strcpy problem -
[MM]RoXoR[FS] - 22.07.2012
How about using format instead and a stock?
pawn Код:
stock strcpy(dest[],src[],maxlength)
{
format(dest,maxlength,"%s",src);
return 1;
}
or
pawn Код:
#define strcpy(%0,%1,%2) \
format(%0,%2,"%s",#%1)
Re: Strcpy problem -
[ABK]Antonio - 22.07.2012
Quote:
Originally Posted by [MM]RoXoR[FS]
How about using format instead and a stock?
pawn Код:
stock strcpy(dest[],src[],maxlength) { format(dest,maxlength,"%s",src); return 1; }
|
Well, the reason would be because that one is faster.
https://sampforum.blast.hk/showthread.php?tid=57018
Re: Strcpy problem -
sampmark05 - 24.07.2012
Fixed its on the y_utils.inc +Rep yall