SA-MP Forums Archive
Warning !! please help - 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: Warning !! please help (/showthread.php?tid=339370)



Warning !! please help - lonako45 - 03.05.2012

this my command :
PHP код:
if(strcmp(cmd"/a"true) == || strcmp(cmd"/activity"true) == 0)
        {
        new 
string1[128];
        
tmp strtok(cmdtext,idx);
        if(!
strlen(tmp))
        {
    ...................
...........
........ 
I have warning on line :
PHP код:
if(strcmp(cmd"/a"true) == || strcmp(cmd"/activity"true) == 0
warning 217: loose indentation
Why?!?! I try all !!


Re: Warning !! please help - JaKe Elite - 03.05.2012

Here is what loose indentation cause

Normal (no warning)

pawn Код:
SendClientMessage(playerid, -1, "I love you bro, i'm gay pro");
GameTextForPlayer(playerid, "~w~Wow ~r~You are a gay pro!", 2000, 4);
Not normal (with loose indentation warning)

Код:
      SendClientMessage(playerid, -1, "I love you bro, i'm gay pro");
GameTextForPlayer(playerid, "~w~Wow ~r~You are a gay pro!", 2000, 4);



Re: Warning !! please help - MadeMan - 03.05.2012

Use TAB

pawn Код:
if(strcmp(cmd, "/a", true) == 0 || strcmp(cmd, "/activity", true) == 0)
{
        new string1[128];
        tmp = strtok(cmdtext,idx);
        if(!strlen(tmp))
        {



Re: Warning !! please help - lonako45 - 03.05.2012

dont work ..
have warning !!
why??


Re: Warning !! please help - JaKe Elite - 03.05.2012

Post the warning we are not mind reader
if you are lazy to fix the warning loose indention use

pawn Код:
#pragma tabsize 0
use this for permanent until you find the line where the warnings begins


Re: Warning !! please help - Mark™ - 03.05.2012

Use TidyPawn to auto-indent your code.


Re: Warning !! please help - lonako45 - 03.05.2012

KING #pragma tabsize 0
but I put the system on Server.cfg || Filerscripts
and the system dont update me on the sever..
on the dos this is load the system but the command dont work
why ? :O


Re: Warning !! please help - HighPitchedVoice - 03.05.2012

pawn Код:
if(strcmp(cmd, "/a", true) == 0 || strcmp(cmd, "/activity", true) == 0)
 {
        new string1[128];
        tmp = strtok(cmdtext,idx);
        if(!strlen(tmp))
        {
    ...................
...........
........
There gotta be 4 spaces between each barrack and text. On opening bracket it will show like this:
pawn Код:
if(strcmp(cmd, "/a", true) == 0 || strcmp(cmd, "/activity", true) == 0)
{ // Opening bracket which means you gotta go 4 spaces till the action.
    new string[128];
When it's a closing bracket you gotta do it the reverse;
pawn Код:
SendClientMessage(playerid, COLOR_WHITE "Testing");
}



Re: Warning !! please help - lonako45 - 03.05.2012

ok
tnx ..
but I have new question .
Quote:

but I put the system on Server.cfg || Filerscripts
and the system dont update me on the sever..
on the dos this is load the system but the command dont work
why ? :O