strcpy?
#1

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)
Reply
#2

Код:
redefinition
Hmm. Wonder what it means. Perhaps that it's already defined somewhere?
Reply
#3

Quote:
Originally Posted by Vince
Посмотреть сообщение
Код:
redefinition
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)
Reply
#4

pawn Код:
#if defined strcpy
    #undef strcpy
#endif

#define strcpy(%0,%1,%2) strcat((%0[0] = '\0', %0), %1, %2)
Reply
#5

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!
Reply
#6

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
Reply
#7

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)