SA-MP Forums Archive
Annoying warnings.. - 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: Annoying warnings.. (/showthread.php?tid=311283)



Annoying warnings.. - vassilis - 15.01.2012

Nevermind fixed :P thanks.


Re: Annoying warnings.. - MR,Mr - 15.01.2012

Quote:
Originally Posted by vassilis
Посмотреть сообщение
Hey guys well i decide to start scripting a gamemode after lot time...well i just put a simple command to teleport somewhere...and it show me warning..-.-

everytime i add a fuction on a callback it gives me 1 more warnings ...what is wrong
why that happens...

example:
pawn Код:
public OnPlayerConnect(playerid)
{
SendClientMessage(playerid,-1,"Welcome to test script!");
    return 1;
}
gives me warning:loose identation..why that happens..
thanks in advance
pawn Код:
public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid,-1,"Welcome to test script!");
    return 1;
}
You need to line the text up. After the { symbol, on the new line, you need to "indent" the line of text. This is done using tab on your keyboard or adding 4 spaces.

EDIT: LMAO at your signature... "Pawn scripter" - You haven't even got your head around indentation yet!


Re: Annoying warnings.. - rinori - 15.01.2012

pawn Код:
public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid,-1,"Welcome to test script!");
    return 1;
}
Stick with the line. When you use a bracket '{', the new line should take some space.


Re: Annoying warnings.. - vassilis - 15.01.2012

Quote:
Originally Posted by MR,Mr
Посмотреть сообщение
pawn Код:
public OnPlayerConnect(playerid)
{
    SendClientMessage(playerid,-1,"Welcome to test script!");
    return 1;
}
You need to line the text up. After the { symbol, on the new line, you need to "indent" the line of text. This is done using tab on your keyboard or adding 4 spaces.

EDIT: LMAO at your signature... "Pawn scripter" - You haven't even got your head around indentation yet!
Mr smart-ass firstly read this - Adrenaline&Stuntworld Gamemode made by vassilis
2ndly sorry i fixed thanks for help but i have to script from november...and i have forgot almost everything.


Re: Annoying warnings.. - Naruto_Emilio - 15.01.2012

put this on your top script
#pragma tabsize 0


Re: Annoying warnings.. - vassilis - 15.01.2012

urg naruto i am mad that i have forgot everything :P thanks for helping tho i fixed it


Re: Annoying warnings.. - MR,Mr - 15.01.2012

You haven't scripted pawn since november? I stopped scripting last may and started again 2 weeks ago - if you actually understand what you're coding, you should be able to remember basics like indentation 1-2 months later.

Not gonna argue as it's not worth it, was just pointing it out.

Plus, no need to get moody with me, I did help, afterall.


Re: Annoying warnings.. - vassilis - 15.01.2012

sorry but i am learning and other scripting languages and i have left pawn totally this is why that was a noobish question though thanks for helping me.


Re: Annoying warnings.. - Infinity - 17.01.2012

Quote:
Originally Posted by Naruto_Emilio
Посмотреть сообщение
put this on your top script
#pragma tabsize 0
No. Just no.

Quote:
Originally Posted by vassilis
Посмотреть сообщение
sorry but i am learning and other scripting languages and i have left pawn totally this is why that was a noobish question though thanks for helping me.
Indentation is one of the basics in just about every scripting and programming language.