Strcpy problem
#1

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

It means that it has already been defined (there's another definition some where).
Reply
#3

But i searched for 3 hours but that's the only strcpy in my script.
Reply
#4

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

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

Fixed its on the y_utils.inc +Rep yall
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)