SA-MP Forums Archive
Errors , what wrong? - 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: Errors , what wrong? (/showthread.php?tid=569074)



Errors , what wrong? - SHFaCeBook - 28.03.2015

hello

i have problem to compile i get error

error
Код:
2093) : error 010: invalid function or declaration
code
2093:
Код:
return 1;
Error on this code:
pawn Код:
public OnPlayerAirbreak(playerid)
{
   if(playerVariables[playerid][pStatus] >= 1)
   {
         if(playerVariables[playerid][pAdminLevel] < 1)
         {
             format(szMessage, sizeof(szMessage), "AdmWarn: {FFFFFF}%s[%d] foloseste AirBreak. Folositi [/spec] pentrua va asigura!", playerVariables[playerid][pNormalName], playerid);
             submitToHelpersAndAdmins(szMessage, COLOR_HOTORANGE);
             return 1;
         }
       }
    }
}
this code was before, i edit it , because when a cheater use cheat airbreak is write to this him and admins ;
pawn Код:
public OnPlayerAirbreak(playerid)
{
    if(playerVariables[playerid][pAdminLevel] < 1)
    {
        format(szMessage, sizeof(szMessage), "AdmWarn: {FFFFFF}%s[%d] foloseste AirBreak. Folositi [/spec] pentrua va asigura!", playerVariables[playerid][pNormalName], playerid);
        submitToHelpersAndAdmins(szMessage, COLOR_HOTORANGE);
    }  
    return 1;
}



Re: Errors , what wrong? - nicholasramdhan - 28.03.2015

I'm not so great with scripting but.. Maybe you could try this:

Код:
public OnPlayerAirbreak(playerid)
{
	if(playerVariables[playerid][pAdminLevel] < 1)
	{
		format(szMessage, sizeof(szMessage), "AdmWarn: {FFFFFF}%s[%d] foloseste AirBreak. Folositi [/spec] pentrua va asigura!", playerVariables[playerid][pNormalName], playerid);
		submitToHelpersAndAdmins(szMessage, COLOR_HOTORANGE);
	}
	
	return 1;
}
Let me know if it works or not


Re: Errors , what wrong? - SHFaCeBook - 28.03.2015

Quote:
Originally Posted by nicholasramdhan
Посмотреть сообщение
I'm not so great with scripting but.. Maybe you could try this:

Код:
public OnPlayerAirbreak(playerid)
{
	if(playerVariables[playerid][pAdminLevel] < 1)
	{
		format(szMessage, sizeof(szMessage), "AdmWarn: {FFFFFF}%s[%d] foloseste AirBreak. Folositi [/spec] pentrua va asigura!", playerVariables[playerid][pNormalName], playerid);
		submitToHelpersAndAdmins(szMessage, COLOR_HOTORANGE);
	}
	
	return 1;
}
Let me know if it works or not
-__- re read what i say :3


Re: Errors , what wrong? - Crayder - 28.03.2015

You had an extra '}'.
pawn Код:
public OnPlayerAirbreak(playerid)
{
    if(playerVariables[playerid][pStatus] >= 1 && playerVariables[playerid][pAdminLevel] < 1)
    {
        format(szMessage, sizeof(szMessage), "AdmWarn: {FFFFFF}%s[%d] foloseste AirBreak. Folositi [/spec] pentrua va asigura!", playerVariables[playerid][pNormalName], playerid);
        submitToHelpersAndAdmins(szMessage, COLOR_HOTORANGE);
    }
    return 1;
}