SA-MP Forums Archive
Help teleport - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help teleport (/showthread.php?tid=152322)



Help teleport - heroyou12 - 03.06.2010

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/help", cmdtext, true, 10) == 0)
{
SendClientMessage(playerid,0xAA3333AA,"Teles: /smaljump ,/bmx ,coming");
SendClientMessage(playerid,0xAA4434AA,"Proov");
SendClientMessage(playerid,0xAA4434AA,"Proov");
SendClientMessage(playerid,0xAA4434AA,"Proov");
//----------------------------------------------------------
if(strcmp("/Smalljump", cmdtext, true) == 0){
SetPlayerPos(playerid, -393.7296,-953.0716 ,91.5887);


}
return 1;
}
return 0;
}


whats wrong with my script my error is :C:\Users\Cpu\Desktop\Sa-mp Server\gamemodes\RP.pwn(155) : warning 217: loose indentation


Re: Help teleport - Flashy - 03.06.2010

On what line is the error? Sure line 217 but which line is that?


Re: Help teleport - Chrisspartan - 03.06.2010

Its a warning,not an error,did you try using it on your server?


Re: Help teleport - FUNExtreme - 03.06.2010

Quote:
Originally Posted by Flashy
On what line is the error? Sure line 217 but which line is that?
The line is 155, the warning number is 217

Quote:
Originally Posted by Chrisspartan
Its a warning,not an error,did you try using it on your server?
Still, I find this a pretty important warning. Indentation makes your code readable.

@topicstarter
Use the search button for information about Indentation



Re: Help teleport - ViruZZzZ_ChiLLL - 03.06.2010

Well first of all loose indentation will not affect
your script. It will still function well.

Loose indentation basically means that, you didn't
indent it properly.

Example :
pawn Код:
public OnGameModeInit()
{
 SetTimer(...)
  SetTimer(...)
 SetTimer(...)
 return 1;
}
Which means, the 2nd SetTimer isn't aligned with the others, or loose indentation.

Perfect Indentation = Win
and its easy to read, therefore, you won't be confused :P


Re: Help teleport - Flashy - 03.06.2010

I make 2 errors in same time xD

I mean sure line 155 and its a warning yes xD


Re: Help teleport - -Rebel Son- - 03.06.2010

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
  if (strcmp("/help", cmdtext, true, 10) == 0)
  {
   SendClientMessage(playerid,0xAA3333AA,"Teles: /smaljump ,/bmx ,coming");
   SendClientMessage(playerid,0xAA4434AA,"Proov");
   SendClientMessage(playerid,0xAA4434AA,"Proov");
   SendClientMessage(playerid,0xAA4434AA,"Proov");
//----------------------------------------------------------
   if(strcmp("/Smalljump", cmdtext, true) == 0){
   SetPlayerPos(playerid, -393.7296,-953.0716 ,91.5887);


  }
  return 1;
  }
  return 0;
  }