Help me i have errors
#1

Код:
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(21194) : error 012: invalid function call, not a valid address
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(21194) : warning 215: expression has no effect
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(21194) : error 001: expected token: ";", but found ")"
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(21194) : error 029: invalid expression, assumed zero
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(21194) : fatal error 107: too many error messages on one line

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


4 Errors.
Line 21194
Код:
format(string, 500, "%s %s [ID:%i] | VIP Level: %d\n", string, PlayerName(i), i, Vip[playerid]);
Whole Thing:
Код:
COMMAND:vips(playerid, params[])
{
    #pragma unused params
    new
        count = 0,
        string[800];
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if (IsPlayerConnected(i))
        {
      		format(string, 500, "%s %s [ID:%i] | VIP Level: %d\n", string, PlayerName(i), i, Vip[playerid]);
        	count++;

        }
	}
	return 1;
}
Help...
Reply
#2

Show me the function PlayerName.
Reply
#3

I only have that.....
Reply
#4

Add this funtion anywhere on your script.
pawn Код:
stock PlayerName(playerid)
{
    new pName[MAX_PLAYER_NAME];
    GetPlayerName(playerid, pName, sizeof(pName));
    return pName;
}
Reply
#5

i got this

Код:
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(9993) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(10070) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(10136) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(10202) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(10234) : warning 219: local variable "pName" shadows a variable at a preceding level
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(21184) : error 021: symbol already defined: "PlayerName"
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(21187) : error 021: symbol already defined: "GetPlayerName"
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(21188) : error 010: invalid function or declaration
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(21200) : error 012: invalid function call, not a valid address
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(21200) : warning 215: expression has no effect
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(21200) : error 001: expected token: ";", but found ")"
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(21200) : error 029: invalid expression, assumed zero
C:\Users\Nikola\Desktop\Papki\samp\gamemodes\Trucking1.pwn(21200) : fatal error 107: too many error messages on one line

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


7 Errors.
Reply
#6

OK, then remove the code that I've sent you and search for this
pawn Код:
stock PlayerName(
then post the code here.
Reply
#7

No such thing
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)