Help me i have errors - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Help me i have errors (
/showthread.php?tid=541852)
Help me i have errors -
TheKnown - 14.10.2014
Код:
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...
AW: Help me i have errors -
Skimmer - 14.10.2014
Show me the function PlayerName.
Re: Help me i have errors -
TheKnown - 14.10.2014
I only have that.....
AW: Help me i have errors -
Skimmer - 14.10.2014
Add this funtion anywhere on your script.
pawn Код:
stock PlayerName(playerid)
{
new pName[MAX_PLAYER_NAME];
GetPlayerName(playerid, pName, sizeof(pName));
return pName;
}
Re: Help me i have errors -
TheKnown - 14.10.2014
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.
AW: Help me i have errors -
Skimmer - 14.10.2014
OK, then remove the code that I've sent you and search for this
then post the code here.
Re: Help me i have errors -
TheKnown - 14.10.2014
No such thing