A little error
#1

Line:
Quote:

if(!sscanf(params, "s[" #MAX_PLAYER_NAME "]", name)) {

Errors:
error 001: expected token: ")", but found "-string-"
warning 215: expression has no effect
warning 215: expression has no effect
error 001: expected token: ";", but found ")"
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.
[/QUOTE]
I hope you help me fast
Reply
#2

As i realise in a_samp.inc:

pawn Код:
#define MAX_PLAYER_NAME (24)
i tried testing till it worked, and i found that you can't do something like this:

pawn Код:
print("Hi, my ID is "#(15)"!");
While this worked:

pawn Код:
print("Hi, my ID is "#15"!");
Try in your script #undef MAX_PLAYER_NAME then re-define it.

example:

pawn Код:
//@Top after includes:

#if defined MAX_PLAYER_NAME
#undef MAX_PLAYER_NAME
#endif
#define MAX_PLAYER_NAME 24

// Anywhere

if(!sscanf(params, "s[" #MAX_PLAYER_NAME "]", name))
{
// rest of your code
}
I hope you got that the compiler doesn't recognize #(15) while it recognizes #15
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)