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: HELP! (
/showthread.php?tid=285213)
HELP! -
Tass007 - 23.09.2011
Hello, i was working on my gamemode and i got this.
Код:
C:\Users\Administrator\Desktop\All Folders\Scripting\Edited Gamemode\Roleplay\gamemodes\rp.pwn(52) : warning 201: redefinition of constant/macro (symbol "strcpy(%0,%1,%2)")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
And This Is The Code
Код:
#define strcpy(%0,%1,%2) %0="",strcat(%0,%2,%1)
Thanks!
Re: HELP! -
admantis - 23.09.2011
Quote:
Originally Posted by Tass007
Hello, i was working on my gamemode and i got this.
Код:
C:\Users\Administrator\Desktop\All Folders\Scripting\Edited Gamemode\Roleplay\gamemodes\rp.pwn(52) : warning 201: redefinition of constant/macro (symbol "strcpy(%0,%1,%2)")
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
And This Is The Code
Код:
#define strcpy(%0,%1,%2) %0="",strcat(%0,%2,%1)
Thanks!
|
Remove the line, strcpy is already coming in the default package just like the other string functions. If you can use strcmp, strcat, strlen, strval and these nature you can use strcpy. It means you a re-defining a native afaik.
Re: HELP! -
Tass007 - 23.09.2011
I Removed That Line And Then Got 6 Errors....
Re: HELP! -
MP2 - 23.09.2011
Remove it from the other place.
Re: HELP! -
Basicz - 23.09.2011
pawn Код:
#if defined strcpy
#undef strcpy
#endif
#define strcpy(%0,%1,%2) %0="",strcat(%0,%2,%1)
What about this one?
What about this strcpy ?
I got this one from Nero_3D's post
pawn Код:
#define strcpy(%0,%1,%2) strcat((%0[0] = '\0', %0), %1, %2)
@ admantis I'm not sure strcpy is available in the default server package? or it have?
Re: HELP! -
Tass007 - 23.09.2011
I got it working i replaced the strcpy with strlen and i changed everything with strcpy with it into strlen
But Thanks For Offering to help me i really thank you!