4 erros - 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: 4 erros (
/showthread.php?tid=493908)
4 erros -
iThePunisher - 10.02.2014
pawn Код:
C:\Users\hacker\Desktop\lscnr script\pawno\include\sscanf2.inc(218) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\lscnr script\pawno\include\sscanf2.inc(218) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\lscnr script\pawno\include\sscanf2.inc(278) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\lscnr script\pawno\include\sscanf2.inc(278) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\lscnr script\pawno\include\dutils.inc(28) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\lscnr script\pawno\include\dutils.inc(132) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\lscnr script\pawno\include\dutils.inc(172) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\lscnr script\pawno\include\dutils.inc(267) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\lscnr script\pawno\include\dutils.inc(324) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\lscnr script\pawno\include\dutils.inc(366) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\lscnr script\pawno\include\dini.inc(257) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\lscnr script\pawno\include\YSI\y_utils.inc(334) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\lscnr script\pawno\include\YSI\y_utils.inc(488) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\lscnr script\pawno\include\YSI\y_utils.inc(520) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\lscnr script\pawno\include\YSI\y_utils.inc(538) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\lscnr script\pawno\include\YSI\y_malloc.inc(215) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\hacker\Desktop\testing\lscnr.pwn(1759) : error 012: invalid function call, not a valid address
C:\Users\hacker\Desktop\testing\lscnr.pwn(1759) : warning 215: expression has no effect
C:\Users\hacker\Desktop\testing\lscnr.pwn(1759) : error 001: expected token: ";", but found ")"
C:\Users\hacker\Desktop\testing\lscnr.pwn(1759) : error 029: invalid expression, assumed zero
C:\Users\hacker\Desktop\testing\lscnr.pwn(1759) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
line 1759
pawn Код:
format(string, 200, "%s has joined the server.", PlayerInfo(playerid));
SendClientMessageToAll(COLOR_DEADCONNECT, string1);
Re: 4 erros -
Konstantinos - 10.02.2014
PlayerInfo is most likely an array for your player's data. If you have an index in the enum for the name (such as pName or whatever) then use it:
pawn Код:
PlayerInfo[playerid][INDEX_NAME_HERE]
Or do it with the normal way:
pawn Код:
new msg[45];
GetPlayerName(playerid, msg, MAX_PLAYER_NAME);
format(msg, sizeof (msg), "%s has joined the server.", msg);
SendClientMessageToAll(COLOR_DEADCONNECT, msg);
Re: 4 erros -
Jankingston - 10.02.2014
just look out, if you are missing any semi-colon ( ; ) ... sometimes it shows error on a particular line, but it dosen't, look up and down from the respective line, it will help.