Symbol never used problem
#1

Guys i have this problem! +REP if solved

Код:
warning 203: symbol is never used: "Dialog_StatsTvrtka"
 warning 203: symbol is never used: "Tvrtka_Evict"
Код:
Dialog_StatsTvrtka(playerid, response, listitem)
{
	if(!response) return 1;
	new OtherPlayer, BusID, TDialogList[256];
	OtherPlayer = APlayerData[playerid][DialogOtherPlayer];
	BusID = APlayerData[OtherPlayer][TrenutnaFirma];
	switch (listitem)
	{
		case 0: 
		{
			format(TDialogList, 256, "%s{00FF00}Naziv Tvrtke{FFFFFF} %s\n", TDialogList, DataTvrtke[BusID][ImeTvrtke]);
			format(TDialogList, 256, "%s{00FF00}Zaposlenih{FFFFFF} %i\n", TDialogList, DataTvrtke[BusID][Zaposlenih]);
			format(TDialogList, 256, "%s{00FF00}Vlasnik{FFFFFF} %s\n", TDialogList, DataTvrtke[BusID][Vlasnik]);
			format(TDialogList, 256, "%s{00FF00}Cijena Tvrtke{FFFFFF} $%i\n", TDialogList, DataTvrtke[BusID][KCijena]);
			ShowPlayerDialog(playerid, DialogInfoTvrtke, DIALOG_STYLE_MSGBOX, "Informacije Tvrtke", TDialogList, "Odaberi", "Odustani");
		}
		case 1: 
		{
			SetPlayerPos(playerid, DataTvrtke[BusID][TvrtkaX], DataTvrtke[BusID][TvrtkaY], DataTvrtke[BusID][TvrtkaZ]);
		}
	}
	return 1;	
}
Код:
Tvrtka_Evict(BusID)
{
	// Setup local variables
	new Msg[128], Name[24], bool:PlayerOnline = false;

	// Check if the business is owned
	if (DataTvrtke[BusID][Kupljena] == true)
	{
		// Loop through all players to find the owner (if he's online)
		for (new pid; pid < MAX_PLAYERS; pid++)
		{
			// Check if this player is online
		    if (IsPlayerConnected(pid))
		    {
		        // Get that player's name
		        GetPlayerName(pid, Name, sizeof(Name));
		        // Compare if this player has the same name as the owner of the business
				if (strcmp(DataTvrtke[BusID][Vlasnik], Name, false) == 0)
				{
				    // Set PlayerOnline to "true"
				    PlayerOnline = true;
					APlayerData[pid][TrenutnaFirma] = 0;
					APlayerData[pid][VTvrtke] = false;

					format(Msg, 128, "{FF0000}Tvoja tvrtka {FFFF00}\"%s\"{FF0000} je izbrisana", DataTvrtke[BusID][ImeTvrtke]);
					SendClientMessage(pid, 0xFFFFFFFF, Msg);
					PlayerFile_Save(pid);

					break;
				}
		    }
		}

		// Check if the player was not online
		if (PlayerOnline == false)
			// Remove the house from the player's account (open the account, remove the data and re-save it)
			PlayerFile_RemoveProperty(DataTvrtke[BusID][Vlasnik], 0, BusID);
	}

	// Clear ownership of the business
	DataTvrtke[BusID][Kupljena] = false;
	DataTvrtke[BusID][Vlasnik] = 0;
	DataTvrtke[BusID][Zarada] = 0;
	DataTvrtke[BusID][Zaposlenih] = 0;
	DataTvrtke[BusID][Poslova] = 0;
	DataTvrtke[BusID][ZadnjaIsplata] = 0;
	// Update the entrance of the business
	DataTvrtke_UpdateEntrance(BusID);

	// Save the businessfile
	DataTvrtke_Save(BusID);
}
Reply
#2

I don't really understand why it's so hard to interpret what the message says. The warning means that you have those functions in your script but that they aren't invoked anywhere. Consequently, the code inside those functions is never executed; never used. Either use these functions somewhere or remove them from your script.
Reply
#3

Nothing inside script! Its from Inculde!
Reply
#4

its too easy to fix it means that the symbol is never used just remove the code that you've shown above
Reply
#5

Or stock it
PHP код:
stock Dialog_StatsTvrtka(playeridresponselistitem)
{
    if(!
response) return 1;
    new 
OtherPlayerBusIDTDialogList[256];
    
OtherPlayer APlayerData[playerid][DialogOtherPlayer];
    
BusID APlayerData[OtherPlayer][TrenutnaFirma];
    switch (
listitem)
    {
        case 
0
        {
            
format(TDialogList256"%s{00FF00}Naziv Tvrtke{FFFFFF} %s\n"TDialogListDataTvrtke[BusID][ImeTvrtke]);
            
format(TDialogList256"%s{00FF00}Zaposlenih{FFFFFF} %i\n"TDialogListDataTvrtke[BusID][Zaposlenih]);
            
format(TDialogList256"%s{00FF00}Vlasnik{FFFFFF} %s\n"TDialogListDataTvrtke[BusID][Vlasnik]);
            
format(TDialogList256"%s{00FF00}Cijena Tvrtke{FFFFFF} $%i\n"TDialogListDataTvrtke[BusID][KCijena]);
            
ShowPlayerDialog(playeridDialogInfoTvrtkeDIALOG_STYLE_MSGBOX"Informacije Tvrtke"TDialogList"Odaberi""Odustani");
        }
        case 
1
        {
            
SetPlayerPos(playeridDataTvrtke[BusID][TvrtkaX], DataTvrtke[BusID][TvrtkaY], DataTvrtke[BusID][TvrtkaZ]);
        }
    }
    return 
1;    

PHP код:
stock Tvrtka_Evict(BusID)
{
    
// Setup local variables
    
new Msg[128], Name[24], bool:PlayerOnline false;
    
// Check if the business is owned
    
if (DataTvrtke[BusID][Kupljena] == true)
    {
        
// Loop through all players to find the owner (if he's online)
        
for (new pidpid MAX_PLAYERSpid++)
        {
            
// Check if this player is online
            
if (IsPlayerConnected(pid))
            {
                
// Get that player's name
                
GetPlayerName(pidNamesizeof(Name));
                
// Compare if this player has the same name as the owner of the business
                
if (strcmp(DataTvrtke[BusID][Vlasnik], Namefalse) == 0)
                {
                    
// Set PlayerOnline to "true"
                    
PlayerOnline true;
                    
APlayerData[pid][TrenutnaFirma] = 0;
                    
APlayerData[pid][VTvrtke] = false;
                    
format(Msg128"{FF0000}Tvoja tvrtka {FFFF00}\"%s\"{FF0000} je izbrisana"DataTvrtke[BusID][ImeTvrtke]);
                    
SendClientMessage(pid0xFFFFFFFFMsg);
                    
PlayerFile_Save(pid);
                    break;
                }
            }
        }
        
// Check if the player was not online
        
if (PlayerOnline == false)
            
// Remove the house from the player's account (open the account, remove the data and re-save it)
            
PlayerFile_RemoveProperty(DataTvrtke[BusID][Vlasnik], 0BusID);
    }
    
// Clear ownership of the business
    
DataTvrtke[BusID][Kupljena] = false;
    
DataTvrtke[BusID][Vlasnik] = 0;
    
DataTvrtke[BusID][Zarada] = 0;
    
DataTvrtke[BusID][Zaposlenih] = 0;
    
DataTvrtke[BusID][Poslova] = 0;
    
DataTvrtke[BusID][ZadnjaIsplata] = 0;
    
// Update the entrance of the business
    
DataTvrtke_UpdateEntrance(BusID);
    
// Save the businessfile
    
DataTvrtke_Save(BusID);

Reply
#6

Another thing is, they are only warnings, they aren't stopping the compilation, or the function of them on the server.

It'll just annoy you having to check that no errors turn up among the compilers output.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)