/setname error ..
#10

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
GetPlayerName returns the lenght of the player's name. This is not how we copy a string to another string.

pawn Код:
#define strcpy(%0,%1,%2) strcat((%0[0] = '\0', %0), %1, %2)
pawn Код:
strcpy(PlayerInfo[id][pOriginalName], originalname, MAX_PLAYER_NAME);
Eh, i got lots of errors with it.. ( If you wanted me to use it, dunno.. .__. )

One was at "#define strcpy(%0,%1,%2) strcat((%0[0] = '\0', %0), %1, %2)"
-- test2.pwn(117) : warning 201: redefinition of constant/macro (symbol "strcpy(%0,%1,%2)") --

And the others were at "strcpy(PlayerInfo[id][pOriginalName], originalname, MAX_PLAYER_NAME);"
-- test2.pwn(2241) : error 001: expected token: ")", but found "["
-- test2.pwn(2241) : warning 215: expression has no effect
-- test2.pwn(2241) : error 001: expected token: ";", but found "]"
-- test2.pwn(2241) : error 029: invalid expression, assumed zero
-- test2.pwn(2241) : fatal error 107: too many error messages on on
Reply


Messages In This Thread
/setname error .. - by Kyance - 07.01.2014, 14:10
Re: /setname error .. - by ViciousRoleplay123 - 07.01.2014, 14:16
Re: /setname error .. - by Kyance - 07.01.2014, 14:16
Re: /setname error .. - by rakshith122 - 07.01.2014, 14:17
Re: /setname error .. - by Kyance - 07.01.2014, 14:21
Re: /setname error .. - by ViciousRoleplay123 - 07.01.2014, 14:26
Re: /setname error .. - by Konstantinos - 07.01.2014, 14:29
Re: /setname error .. - by Kyance - 07.01.2014, 14:31
Re: /setname error .. - by Konstantinos - 07.01.2014, 14:41
Re: /setname error .. - by Kyance - 07.01.2014, 14:46

Forum Jump:


Users browsing this thread: 1 Guest(s)