help menu esay help just fix warning help plz!!!
#1

hey i have some warning an how do i take it out? here script =

Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/level 1", cmdtext, true, 10))
{
ShowPlayerDialog(playerid,0x33AA33AA,DIALOG_STYLE_ LIST,"|||level 1|||","\ngetinfo\nweaps\nvr\nrepair\nltune\n\nlhy\ nlnos\nlp\nasay\nping\nlslowmo\nltc\nmorning\nadmi narea\nreports\nrichlist\nminiguns\nsaveplacae\ngo toplace\nsaveskin\nuseskin\ndontuseskin."," Done","Close");
return 1;
}
if (strcmp("/level 2", cmdtext, true, 10))
{
ShowPlayerDialog(playerid,0x33AA33AA,DIALOG_STYLE_ LIST,"|||LEVEL 2|||","\ngiveweapon\nsetcolour\nlockcar\nunlockcar \nburn\nspawn\ndisarm\nlcar\nlbike\nlheli\nlboat\n lplane\nhightlight\nannounce\nannounce2\nscreen\nj etpack\nflip\ngoto\nvgoto\nlgoto\nfu\nwarn\nslap\n jailed\nfrozen\nmute\nunmute\nmuted\nlaston\nlspec \nlspecoff\nlspecvehicle\nclearchat\nlmenu\nltele\ ncm\nltmenu\nwrite."," Done","Cancel");
return 1;
}
if (strcmp("/level 3", cmdtext, true, 10))
{
SendClientMessage(playerid, 0x33AA33AA,"||| More !!!! |||");
SendClientMessage(playerid, 0x33AA33AA,"setalltime,setallworld,setallscore,set allcash,giveallcash,giveallweapon,lweather,ltime,l weapons,setarmour,setcash,setscore,setskin,setwant ed,setname,setweather,settime,setworld.");
ShowPlayerDialog(playerid, 0x33AA33AA,DIALOG_STYLE_LIST,"|||level 3|||","\nsethealth\nsetinterior\nforce\neject\nban krupt\nsbankrupt\nubound\nlweaps\nlammo\ncountdown \nduel\ncar\ncarhealth\ncarcolour\nsetping\nsetgra vity\ndestroycar\nteleplayer\nvget\ngivecar\ngethe re\nget\nkick\nexplode\njail\nunjail\nfreeze\nunfr eeze\nakill\naka\ndisablechat\nclearallchat\ncaps\ nmove\nmoveplayer\nhealall\narmourall\nsetallskin\ nsetallwanted\nsetallweather."," Done","Close");
return 1;
}
if (strcmp("/level 4", cmdtext, true, 10))
{
ShowPlayerDialog(playerid, 0x33AA33AA,DIALOG_STYLE_LIST,"|||level 4|||","\ncrash\nenable\ndisable\ngod\ngodcar\ndie\ nban\nrban\nsettemplevel\nuconfig\nbotcheck\nlocks erver\nunlockserver\nforbidname\nforbidword\ninvis \nuninvis\nkillinvis\nfakedeath\nspawnall\nmuteall \nunmuteall\ngetall\nkillall\nfreezeall\nunfreezea ll\nkickall\nslapalll\nexplodeall\ndisarmall\nejec tall."," Done","Close");
return 1;
}
if (strcmp("/level 5", cmdtext, true, 10))
{
ShowPlayerDialog(playerid, 0x33AA33AA,DIALOG_STYLE_LIST,"|||level 5|||","\ngod\nsgod\nsetlevel\npickup\nobject\nfake chat\nspam."," Done","Close");
return 1;
}
if (strcmp("/rcon", cmdtext, true, 10))
{
ShowPlayerDialog(playerid, 0x33AA33AA,DIALOG_STYLE_LIST,"|||RCON!|||","\ninfo \naka\npm\nasay\nann\nuconfig\nchat."," Done","Close");
return 1;
}
return 0;
}

and here what i get =

Quote:

C:\Users\GOTITA DE AMOR\Desktop\elvisserver3\filterscripts\d.pwn(97) : warning 217: loose indentation
C:\Users\GOTITA DE AMOR\Desktop\elvisserver3\filterscripts\d.pwn(102) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase






2 Warnings.

help please trying make a admin cmds menu but warning =[

i dont need explain more i put everything i did in here!!
Reply
#2

Warning loose indentation means that you forgot tabulator [Tab button]
Example:
pawn Код:
if(strcmp("/kill",cmdtext,true 10) == 0)
{
SetPlayerHealth(playerid,0);
return 1;
}
Here you'll get warning and next one is right one:
pawn Код:
if(strcmp("/kill",cmdtext,true,10) == 0)
{
    SetPlayerHealth(playerid,0);
    return 1;
}
Paste this into your script:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/level 1", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid,0x33AA33AA,DIALOG_STYLE_ LIST,"|||level 1|||","\ngetinfo\nweaps\nvr\nrepair\nltune\n\nlhy\ nlnos\nlp\nasay\nping\nlslowmo\nltc\nmorning\nadmi narea\nreports\nrichlist\nminiguns\nsaveplacae\ngo toplace\nsaveskin\nuseskin\ndontuseskin."," Done","Close");
        return 1;
    }
    if (strcmp("/level 2", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid,0x33AA33AA,DIALOG_STYLE_ LIST,"|||LEVEL 2|||","\ngiveweapon\nsetcolour\nlockcar\nunlockcar \nburn\nspawn\ndisarm\nlcar\nlbike\nlheli\nlboat\n lplane\nhightlight\nannounce\nannounce2\nscreen\nj etpack\nflip\ngoto\nvgoto\nlgoto\nfu\nwarn\nslap\n jailed\nfrozen\nmute\nunmute\nmuted\nlaston\nlspec \nlspecoff\nlspecvehicle\nclearchat\nlmenu\nltele\ ncm\nltmenu\nwrite."," Done","Cancel");
        return 1;
    }
    if (strcmp("/level 3", cmdtext, true, 10) == 0)
    {
        SendClientMessage(playerid, 0x33AA33AA,"||| More !!!! |||");
        SendClientMessage(playerid, 0x33AA33AA,"setalltime,setallworld,setallscore,set allcash,giveallcash,giveallweapon,lweather,ltime,l weapons,setarmour,setcash,setscore,setskin,setwant ed,setname,setweather,settime,setworld.");
        ShowPlayerDialog(playerid, 0x33AA33AA,DIALOG_STYLE_LIST,"|||level 3|||","\nsethealth\nsetinterior\nforce\neject\nban krupt\nsbankrupt\nubound\nlweaps\nlammo\ncountdown \nduel\ncar\ncarhealth\ncarcolour\nsetping\nsetgra vity\ndestroycar\nteleplayer\nvget\ngivecar\ngethe re\nget\nkick\nexplode\njail\nunjail\nfreeze\nunfr eeze\nakill\naka\ndisablechat\nclearallchat\ncaps\ nmove\nmoveplayer\nhealall\narmourall\nsetallskin\ nsetallwanted\nsetallweather."," Done","Close");
        return 1;
    }
    if (strcmp("/level 4", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid, 0x33AA33AA,DIALOG_STYLE_LIST,"|||level 4|||","\ncrash\nenable\ndisable\ngod\ngodcar\ndie\ nban\nrban\nsettemplevel\nuconfig\nbotcheck\nlocks erver\nunlockserver\nforbidname\nforbidword\ninvis \nuninvis\nkillinvis\nfakedeath\nspawnall\nmuteall \nunmuteall\ngetall\nkillall\nfreezeall\nunfreezea ll\nkickall\nslapalll\nexplodeall\ndisarmall\nejec tall."," Done","Close");
        return 1;
    }
    if (strcmp("/level 5", cmdtext, true, 10) == 0)
    {
        ShowPlayerDialog(playerid, 0x33AA33AA,DIALOG_STYLE_LIST,"|||level 5|||","\ngod\nsgod\nsetlevel\npickup\nobject\nfake chat\nspam."," Done","Close");
        return 1;
    }
    if (strcmp("/rcon", cmdtext, true, 10) == 0)
    {
    ShowPlayerDialog(playerid, 0x33AA33AA,DIALOG_STYLE_LIST,"|||RCON!|||","\ninfo \naka\npm\nasay\nann\nuconfig\nchat."," Done","Close");
    return 1;
    }
    return 0;
}
Reply
#3

thx bro
Reply
#4

o wait =[
Quote:

C:\Users\GOTITA DE AMOR\Desktop\elvisserver3\filterscripts\CMD.pwn(93 ) : error 027: invalid character constant
C:\Users\GOTITA DE AMOR\Desktop\elvisserver3\filterscripts\CMD.pwn(93 ) : error 017: undefined symbol "DIALOG_STYLE_"
C:\Users\GOTITA DE AMOR\Desktop\elvisserver3\filterscripts\CMD.pwn(93 ) : error 017: undefined symbol "LIST"
C:\Users\GOTITA DE AMOR\Desktop\elvisserver3\filterscripts\CMD.pwn(93 ) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.

Reply
#5

Show me line 93
Reply
#6

Now it's correct:

PHP код:
public OnPlayerCommandText(playeridcmdtext[])
{
    if (
strcmp("/level 1"cmdtexttrue10) == 0)
    {
        
ShowPlayerDialog(playerid,0x33AA33AA,DIALOG_STYLE_LIST,"|||level 1|||","\ngetinfo\nweaps\nvr\nrepair\nltune\n\nlhy\ nlnos\nlp\nasay\nping\nlslowmo\nltc\nmorning\nadmi narea\nreports\nrichlist\nminiguns\nsaveplacae\ngo toplace\nsaveskin\nuseskin\ndontuseskin."," Done","Close");
        return 
1;
    }
    if (
strcmp("/level 2"cmdtexttrue10) == 0)
    {
        
ShowPlayerDialog(playerid,0x33AA33AA,DIALOG_STYLE_LIST,"|||LEVEL 2|||","\ngiveweapon\nsetcolour\nlockcar\nunlockcar \nburn\nspawn\ndisarm\nlcar\nlbike\nlheli\nlboat\n lplane\nhightlight\nannounce\nannounce2\nscreen\nj etpack\nflip\ngoto\nvgoto\nlgoto\nfu\nwarn\nslap\n jailed\nfrozen\nmute\nunmute\nmuted\nlaston\nlspec \nlspecoff\nlspecvehicle\nclearchat\nlmenu\nltele\ ncm\nltmenu\nwrite."," Done","Cancel");
        return 
1;
    }
    if (
strcmp("/level 3"cmdtexttrue10) == 0)
    {
        
SendClientMessage(playerid0x33AA33AA,"||| More !!!! |||");
        
SendClientMessage(playerid0x33AA33AA,"setalltime,setallworld,setallscore,set allcash,giveallcash,giveallweapon,lweather,ltime,l weapons,setarmour,setcash,setscore,setskin,setwant ed,setname,setweather,settime,setworld.");
        
ShowPlayerDialog(playerid0x33AA33AA,DIALOG_STYLE_LIST,"|||level 3|||","\nsethealth\nsetinterior\nforce\neject\nban krupt\nsbankrupt\nubound\nlweaps\nlammo\ncountdown \nduel\ncar\ncarhealth\ncarcolour\nsetping\nsetgra vity\ndestroycar\nteleplayer\nvget\ngivecar\ngethe re\nget\nkick\nexplode\njail\nunjail\nfreeze\nunfr eeze\nakill\naka\ndisablechat\nclearallchat\ncaps\ nmove\nmoveplayer\nhealall\narmourall\nsetallskin\ nsetallwanted\nsetallweather."," Done","Close");
        return 
1;
    }
    if (
strcmp("/level 4"cmdtexttrue10) == 0)
    {
        
ShowPlayerDialog(playerid0x33AA33AA,DIALOG_STYLE_LIST,"|||level 4|||","\ncrash\nenable\ndisable\ngod\ngodcar\ndie\ nban\nrban\nsettemplevel\nuconfig\nbotcheck\nlocks erver\nunlockserver\nforbidname\nforbidword\ninvis \nuninvis\nkillinvis\nfakedeath\nspawnall\nmuteall \nunmuteall\ngetall\nkillall\nfreezeall\nunfreezea ll\nkickall\nslapalll\nexplodeall\ndisarmall\nejec tall."," Done","Close");
        return 
1;
    }
    if (
strcmp("/level 5"cmdtexttrue10) == 0)
    {
        
ShowPlayerDialog(playerid0x33AA33AA,DIALOG_STYLE_LIST,"|||level 5|||","\ngod\nsgod\nsetlevel\npickup\nobject\nfake chat\nspam."," Done","Close");
        return 
1;
    }
    if (
strcmp("/rcon"cmdtexttrue10) == 0)
    {
    
ShowPlayerDialog(playerid0x33AA33AA,DIALOG_STYLE_LIST,"|||RCON!|||","\ninfo \naka\npm\nasay\nann\nuconfig\nchat."," Done","Close");
    return 
1;
    }
    return 
0;

Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)