Give me error
#1

this code when i try to compile it it give me errors

Code:
PHP код:
CMD:highoff(playerid,params[])
{
  if(
pInfo[playerid][pLevel] >= 5)
  {
  new 
target;
  if(
sscanf(params,"us[100]",target)) return SendClientMessage(playerid,red,"USAGE: /highoff [playerid]");
  if(
MegaJump[target] == 1)
  {
    new 
string[134];
    
format(string,sizeof(string),"* Admin %s Has Disabled For you HighJump",GetName(playerid));
    
MegaJump[target] = 0;
    }
    else if(
MegaJump[target] == 0)
    {
        
SendClientMessage(playerid, -1"This Player Not Using /highjump Now");
    }
   return 
1;
   }
   else return 
ShowMessage(playerid,red,1);
   }
   else return 
ShowMessage(playerid,red,2);
   } 
Errors:
PHP код:
D:\samp folder\XtremeX-Stunting\filterscripts\JLadmin.pwn(9125) : error 010invalid function or declaration 
Line Error:
PHP код:
else return ShowMessage(playerid,red,2); 
Reply
#2

I'm starting to feel like a broken record, but work on your indentation. If you would have done that, you would have seen that the code is formatted wrongly, and that the last ShowMessage(...), which causes an error, is not part of the command.
Reply
#3

what should i do in it
Reply
#4

Quote:
Originally Posted by Loinal
Посмотреть сообщение
what should i do in it
Step 1:
Indent your code

Step 2:
When you are doing so, you will notice something is wrong. Fix that.

Step 3:
Done.
Reply
#5

Thanks
Reply
#6

Код:
CMD:highoff(playerid,params[])
{
  	if(pInfo[playerid][pLevel] >= 5)
  	{
  		new target;
  		if(sscanf(params,"u",target)) return SendClientMessage(playerid,red,"USAGE: /highoff [playerid]");
  		if(!IsPlayerConnected(target)) return SendClientMessage(playerid,red,"Player not connected);
  		if(MegaJump[target] == 1)
  		{
    		        new string[68];
    		        format(string,sizeof(string),"* Admin %s Has Disabled For you HighJump",GetName(playerid));
    		        SendClientMessage(target,red,string);
    		        MegaJump[target] = 0;
    	        }
    	        else { SendClientMessage(playerid, -1, "This Player Not Using /highjump Now"); }
   }
   else { SendClientMessage(playerid,red," You're not an admin with the required level!"); }
   return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)