strcpy? - 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? (
/showthread.php?tid=594346)
strcpy? -
N0FeaR - 16.11.2015
Any clue whats the problem with this?
Код:
C:\Users\Jeffner\Desktop\Roleplay\gamemodes\rp.pwn(54) : warning 201: redefinition of constant/macro (symbol "strcpy(%0,%1,%2)")
Код HTML:
#define strcpy(%0,%1,%2) %0="",strcat(%0,%2,%1)
Re: strcpy? -
Vince - 16.11.2015
Hmm. Wonder what it means. Perhaps that it's already defined somewhere?
Re: strcpy? -
N0FeaR - 16.11.2015
Quote:
Originally Posted by Vince
Hmm. Wonder what it means. Perhaps that it's already defined somewhere?
|
Yeah no i just have one, strange...
Код:
#define strcpy(%0,%1,%2) %0="",strcat(%0,%2,%1)
Re: strcpy? -
Kevln - 16.11.2015
pawn Код:
#if defined strcpy
#undef strcpy
#endif
#define strcpy(%0,%1,%2) strcat((%0[0] = '\0', %0), %1, %2)
Re: strcpy? -
N0FeaR - 16.11.2015
Quote:
Originally Posted by Kevln
pawn Код:
#if defined strcpy #undef strcpy #endif
#define strcpy(%0,%1,%2) strcat((%0[0] = '\0', %0), %1, %2)
|
that's works thx!
Re: strcpy? -
jamesbond007 - 17.11.2015
Quote:
Originally Posted by N0FeaR
Yeah no i just have one, strange...
Код:
#define strcpy(%0,%1,%2) %0="",strcat(%0,%2,%1)
|
*facepalm*
rofl vince is trolling cause plebs cant even read errors
Re: strcpy? -
Sew_Sumi - 17.11.2015
Quote:
Originally Posted by jamesbond007
*facepalm*
rofl vince is trolling cause plebs cant even read errors
|
He's not trolling...
Obviously somewhere in his includes, or in the script where he hasn't checked, there is a define done.
Pasting up "solutions" like this, simply add more crap to the script making it bloated and more clogged to read.
Even though it's "fixing it", it's not the best method. For learning, or in practical use.