SA-MP Forums Archive
few 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: few errors (/showthread.php?tid=651741)



few errors - ivndosos - 26.03.2018

Код:
	gYouKilled[playerid] = CreatePlayerTextDraw(playerid,241.000000, 371.000000, "_");
	PlayerTextDrawBackgroundColor(playerid,gYouKilled[playerid], 227526655);
	PlayerTextDrawFont(playerid, gYouKilled[playerid], 3);
	PlayerTextDrawLetterSize(playerid, gYouKilled[playerid], 0.329999, 1.300000);
	PlayerTextDrawColor(playerid, gYouKilled[playerid], 255);
	PlayerTextDrawSetOutline(playerid,gYouKilled[playerid], 1);
	PlayerTextDrawSetProportional(playerid, gYouKilled[playerid], 1);
Код:
C:\Users\yan\Desktop\Battlegrounds\gamemodes\gw.pwn(43) : error 017: undefined symbol "playerid"
C:\Users\yan\Desktop\Battlegrounds\gamemodes\gw.pwn(44) : error 017: undefined symbol "playerid"
C:\Users\yan\Desktop\Battlegrounds\gamemodes\gw.pwn(45) : error 017: undefined symbol "playerid"
C:\Users\yan\Desktop\Battlegrounds\gamemodes\gw.pwn(46) : error 017: undefined symbol "playerid"
C:\Users\yan\Desktop\Battlegrounds\gamemodes\gw.pwn(47) : error 017: undefined symbol "playerid"
C:\Users\yan\Desktop\Battlegrounds\gamemodes\gw.pwn(48) : error 017: undefined symbol "playerid"
C:\Users\yan\Desktop\Battlegrounds\gamemodes\gw.pwn(49) : error 017: undefined symbol "playerid"
C:\Users\yan\Desktop\Battlegrounds\gamemodes\gw.pwn(204) : error 035: argument type mismatch (argument 2)
C:\Users\yan\Desktop\Battlegrounds\gamemodes\gw.pwn(205) : error 035: argument type mismatch (argument 2)
C:\Users\yan\Desktop\Battlegrounds\gamemodes\gw.pwn(353) : warning 203: symbol is never used: "gKilledBy"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


9 Errors.
Код:
new PlayerText:gYouKilled[MAX_PLAYERS];



Re: few errors - Grim_ - 26.03.2018

Is this code in a callback that defines playerid?


Re: few errors - Nru - 26.03.2018

Код:
	gYouKilled[playerid] = CreatePlayerTextDraw(playerid,241.000000, 371.000000, "_");
	PlayerTextDrawBackgroundColor(playerid,gYouKilled[playerid], 227526655);
	PlayerTextDrawFont(playerid, gYouKilled[playerid], 3);
	PlayerTextDrawLetterSize(playerid, gYouKilled[playerid], 0.329999, 1.300000);
	PlayerTextDrawColor(playerid, gYouKilled[playerid], 255);
	PlayerTextDrawSetOutline(playerid,gYouKilled[playerid], 1);
	PlayerTextDrawSetProportional(playerid, gYouKilled[playerid], 1);
This code need to be under OnPlayerConnect.


Re: few errors - ivndosos - 26.03.2018

Quote:
Originally Posted by Nru
Посмотреть сообщение
Код:
	gYouKilled[playerid] = CreatePlayerTextDraw(playerid,241.000000, 371.000000, "_");
	PlayerTextDrawBackgroundColor(playerid,gYouKilled[playerid], 227526655);
	PlayerTextDrawFont(playerid, gYouKilled[playerid], 3);
	PlayerTextDrawLetterSize(playerid, gYouKilled[playerid], 0.329999, 1.300000);
	PlayerTextDrawColor(playerid, gYouKilled[playerid], 255);
	PlayerTextDrawSetOutline(playerid,gYouKilled[playerid], 1);
	PlayerTextDrawSetProportional(playerid, gYouKilled[playerid], 1);
This code need to be under OnPlayerConnect.
thanks