SA-MP Forums Archive
Lose Indentation - 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: Lose Indentation (/showthread.php?tid=550855)



Lose Indentation - Dezzzy - 15.12.2014

hey guys
i found new FS and i have 1 warning in there can you help me ..
this is picture


And I Have Error At 94 Line

Код HTML:
C:\Users\Gigi\Desktop\Fuliox-Rp\filterscripts\megaphone.pwn(94) : warning 217: loose indentation
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Warning.
what could i do ..


Re: Lose Indentation - Ryz - 15.12.2014

pawn Код:
new Float:x,Float:y,Float:z;
not pos[4]

pawn Код:
GetPlayerPos(playerid, x, y, z);



Re: Lose Indentation - Dezzzy - 15.12.2014

i got this warnings
Код HTML:
C:\Users\Gigi\Desktop\Fuliox-Rp\filterscripts\megaphone.pwn(94) : warning 217: loose indentation
C:\Users\Gigi\Desktop\Fuliox-Rp\filterscripts\megaphone.pwn(96) : error 017: undefined symbol "pos"
C:\Users\Gigi\Desktop\Fuliox-Rp\filterscripts\megaphone.pwn(96) : warning 215: expression has no effect
C:\Users\Gigi\Desktop\Fuliox-Rp\filterscripts\megaphone.pwn(96) : error 001: expected token: ";", but found "]"
C:\Users\Gigi\Desktop\Fuliox-Rp\filterscripts\megaphone.pwn(96) : error 029: invalid expression, assumed zero
C:\Users\Gigi\Desktop\Fuliox-Rp\filterscripts\megaphone.pwn(96) : fatal error 107: too many error messages on one line

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


4 Errors.
code
Код HTML:
new Float:x,Float:y,Float:z;
        GetPlayerPos(playerid, x, y, z);
        PlaySoundEx(soundid, pos[0], pos[1], pos[2], 15);
        return 1;
        }
        return 0;
}



Re: Lose Indentation - Ryz - 15.12.2014

pawn Код:
new Float:x,Float:y,Float:z;
        GetPlayerPos(playerid, x, y, z);
        PlaySoundEx(soundid, x, y, z, 15);
        return 1;
        }
        return 0;
}



Re: Lose Indentation - Dezzzy - 15.12.2014

Again i have same problemm


Код HTML:
94 Line ---- Loose Indentation
Код HTML:
new Float:x,Float:y,Float:z;
        GetPlayerPos(playerid, x, y, z);
        PlaySoundEx(soundid, x, y, z, 15);
        return 1;
        }
        return 0;
}



Re: Lose Indentation - UltraScripter - 15.12.2014

Send The Code And Ill Fix It!!!


Re: Lose Indentation - Ryz - 15.12.2014

what is stock for PlaySoundEx? can u plz paste here


Re: Lose Indentation - Dezzzy - 15.12.2014

Код HTML:
stock PlaySoundEx(soundid, Float:x, Float:y, Float:z, range)
{
        foreach(new i : Player)
        {
                if(!IsPlayerConnected(i)) continue;
                if(!IsPlayerInRangeOfPoint(i, range, x, y, z)) continue;
                PlayerPlaySound(i, soundid, 0, 0, 0);
        }
}



Re: Lose Indentation - Threshold - 15.12.2014

https://sampforum.blast.hk/showthread.php?tid=256961

There's a thing called indentation, read this and make sure you understand why you need to use it.


Re: Lose Indentation - XaibBaba - 15.12.2014

from my opnion you can avoid the warning even if it is one , but first check all commands cus some time script does not work due to Loose Identifications! , but you can avoide them