[CAMPANIE STAFF]Cautam moderatori si designeri activi!
Welcome to WTFCS Community Forums!
Servere gaming la super-preturi! [HOSTING SERVICE]
-->






[Tutorial] Cum rezolvam warning 217: loose indentation
Author : SaTaNa99, Category : Tutoriale, 0 Replyes, 1376 Views
EVALUATE THIS TOPIC
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
1 Guest(s)
fondator rsp.wtfcs.com
 
421
POSTS
150
THREADS
0
REPUTATION
Male
Sex

WtfCs Coins: -0.01[w]
01-09-2014, 11:25 AM
#1
In acest tutorial am sa va arat cum rezolvati acest warning



Sa zicem ca avem codul cu pricina


if( !strcmp( cmdtext, "/problema", true ) )
{
if( !strcmp( cmdtext[ 4 ], "probl", true ) )
{
SendClientMessage( playerid, -1, "PROBLEMA in curs" );
}
return 1;
}





Dupa cum observati liniile sunt cam "alandala", e, din cauza asta iei acel warning "warning 217: loose indentation" (isi pierde identitatea)



Rezolvarea codului


if( !strcmp( cmdtext, "/problema", true ) )
{
// Avem o paranteza "{" deci am mers cu 4 spatii mai in fata
if( !strcmp( cmdtext[ 4 ], "probl", true ) )
{
//Alta paranteza "{" mai mergem 4 spatii in fata
SendClientMessage( playerid, -1, "PROBLEMA in curs" );

}
//Am inchis paranteza, am dat 4 space-uri inapoi
return 1;
}
Regulament forum: You are not allowed to view links. Register or Login to view.

You are not allowed to view links. Register or Login to view.

You are not allowed to view links. Register or Login to view.


Forum Jump: