Jump to content
  • 0

Error compile


official

Question

Problema intalnita (descriere): cand compilez imi apar niste errori
Ero(area / rile) / warning-(ul / urile): 

C:UsersRootDesktopDADA (2)pawnoincludeShowInfoForPlayer.inc(17) : error 010: invalid function or declaration
C:UsersRootDesktopDADA (2)pawnoincludeShowInfoForPlayer.inc(20) : error 010: invalid function or declaration
C:UsersRootDesktopDADA (2)pawnoincludeShowInfoForPlayer.inc(23) : error 010: invalid function or declaration
C:UsersRootDesktopDADA (2)pawnoincludeShowInfoForPlayer.inc(26) : error 010: invalid function or declaration
C:UsersRootDesktopDADA (2)pawnoincludeShowInfoForPlayer.inc(36) : error 010: invalid function or declaration
C:UsersRootDesktopDADA (2)pawnoincludeShowInfoForPlayer.inc(37) : error 010: invalid function or declaration
C:UsersRootDesktopDADA (2)pawnoincludeShowInfoForPlayer.inc(45) : error 017: undefined symbol "InfoTextShowing"
C:UsersRootDesktopDADA (2)pawnoincludeShowInfoForPlayer.inc(45) : warning 215: expression has no effect
C:UsersRootDesktopDADA (2)pawnoincludeShowInfoForPlayer.inc(45) : error 001: expected token: ";", but found "]"
C:UsersRootDesktopDADA (2)pawnoincludeShowInfoForPlayer.inc(45) : error 029: invalid expression, assumed zero
C:UsersRootDesktopDADA (2)pawnoincludeShowInfoForPlayer.inc(45) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


10 Errors.

Liniile de cod / sursa / script-ul(obligatoriu): folosesc acest include http://forum.sa-mp.com/showthread.php?p=2565586
Imagini / Video (optional):
Ati incercat sa rezolvati singur?: da am incercat dar nimic...

Link to comment
Share on other sites

5 answers to this question

Recommended Posts

  • 0

Uite tot include'ul 

/*
	ShowInfoForPlayer include by Richie©.
	
	If you dont want to use y_hooks you can
	move the code from OnPlayerDisconnect(playerid, reason)
	and OnPlayerConnect(playerid) to those callbacks in
	your script. 
	
	To use it, place it under your other includes.
*/
#include <YSIy_hooks>

new PlayerText:InfoText[MAX_PLAYERS],
	InfoTimer[MAX_PLAYERS];


hook OnPlayerDisconnect(playerid, reason)
{
	PlayerTextDrawDestroy(playerid, InfoText[playerid]);
	return 1;
}

hook OnPlayerConnect(playerid)
{
	// Create the textdraw
	InfoText[playerid] = CreatePlayerTextDraw(playerid, 319.999938, 401.955749, "_");
	PlayerTextDrawLetterSize(playerid, InfoText[playerid], 0.241999, 1.280593);
	PlayerTextDrawAlignment(playerid, InfoText[playerid], 2);
	PlayerTextDrawColor(playerid, InfoText[playerid], -1);
	PlayerTextDrawSetShadow(playerid, InfoText[playerid], 0);
	PlayerTextDrawSetOutline(playerid, InfoText[playerid], 1);
	PlayerTextDrawBackgroundColor(playerid, InfoText[playerid], 51);
	PlayerTextDrawFont(playerid, InfoText[playerid], 1);
	PlayerTextDrawSetProportional(playerid, InfoText[playerid], 1);
	
	InfoTextShowing[playerid] = 0;
	return 1;
}

stock ShowInfoForPlayer(playerid, text[], time) // playerid to show, text to show, time to show in ms
{
	KillTimer(InfoTimer[playerid]);
    PlayerTextDrawHide(playerid, InfoText[playerid]);
	new info[256];
    InfoTextShowing[playerid] = 1;
    format(info, sizeof(info), "%s", text);
    PlayerTextDrawSetString(playerid, InfoText[playerid], info);
	PlayerTextDrawShow(playerid, InfoText[playerid]);
	InfoTimer[playerid] = SetTimerEx("HideInfoForPlayer", time, false, "i", playerid);
	return 1;
}

forward HideInfoForPlayer(playerid); // Hide the info message for player.
public HideInfoForPlayer(playerid)
{
	if(!IsPlayerConnected(playerid)) return 1;
    PlayerTextDrawHide(playerid, InfoText[playerid]);
    InfoTextShowing[playerid] = 0;
    return 1;
}
Link to comment
Share on other sites

  • 0

 Am folosit in loc de "hook" "public" si am ramas cu erorile astea 

C:UsersRootDesktopDA (2)pawnoincludeShowInfoForPlayer.inc(36) : error 017: undefined symbol "InfoTextShowing"
C:UsersRootDesktopDA (2)pawnoincludeShowInfoForPlayer.inc(36) : warning 215: expression has no effect
C:UsersRootDesktopDA (2)pawnoincludeShowInfoForPlayer.inc(36) : error 001: expected token: ";", but found "]"
C:UsersRootDesktopDA (2)pawnoincludeShowInfoForPlayer.inc(36) : error 029: invalid expression, assumed zero
C:UsersRootDesktopDA (2)pawnoincludeShowInfoForPlayer.inc(36) : 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.

 Liniile fiind

   InfoTextShowing[playerid] = 0; 
Edited by official
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.