SA-MP Forums Archive
[Ajuda]Alguem ajuda a tirar warning - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [Ajuda]Alguem ajuda a tirar warning (/showthread.php?tid=340849)



[Ajuda]Alguem ajuda a tirar warning - Adriano_MQD - 08.05.2012

ta com essa warning aqui

Quote:

C:\Documents and Settings\note\Desktop\samp03dsvr_R2_win32\gamemode s\GM.pwn(263) : warning 209: function "OnPlayerCommandText" should return a value
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Warning.

e й isso aqui que tem no OnPlayerCommandText
(sou novo no pawno)

Quote:

public OnPlayerCommandText(playerid, cmdtext[])

if(strcmp(cmdtext,"/ps",true)==0)
{
new vehicleid = GetPlayerVehicleID(playerid);
new State = GetPlayerState(playerid);
if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
{
GameTextForPlayer(playerid,"Concerte seu Carro",4000,6);
LinkVehicleToInterior(vehicleid,0);
SetPlayerInterior(playerid,0);
return SetVehiclePos(vehicleid,2079.0764,-1831.3076,13.382;
}
SetPlayerPos(playerid,2079.0764,-1831.3076,13.382;
SetPlayerInterior(playerid,0);
GameTextForPlayer(playerid,"Concerte seu Carro",4000,6);
return 1;
}




Re: [Ajuda]Alguem ajuda a tirar warning - .FuneraL. - 08.05.2012

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     if(strcmp(cmdtext,"/ps",true)==0)
     {
          new vehicleid = GetPlayerVehicleID(playerid);
          new State = GetPlayerState(playerid);
          if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
          {
              GameTextForPlayer(playerid,"Concerte seu Carro",4000,6);
              LinkVehicleToInterior(vehicleid,0);
              SetPlayerInterior(playerid,0);
              return SetVehiclePos(vehicleid,2079.0764,-1831.3076,13.382;
          }
          SetPlayerPos(playerid,2079.0764,-1831.3076,13.382;
          SetPlayerInterior(playerid,0);
          GameTextForPlayer(playerid,"Concerte seu Carro",4000,6);
          return 1;
      }
      return 0;
}
Aн Corrigido.


Re: [Ajuda]Alguem ajuda a tirar warning - Adriano_MQD - 08.05.2012

Troquei pra esse ai e deu esses 2 erros

Quote:

C:\Documents and Settings\note\Desktop\samp03dsvr_R2_win32\gamemode s\GM.pwn(255) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\note\Desktop\samp03dsvr_R2_win32\gamemode s\GM.pwn(257) : error 001: expected token: ",", but found ";"
C:\Documents and Settings\note\Desktop\samp03dsvr_R2_win32\gamemode s\GM.pwn(262) : warning 217: loose indentation
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.




Re: [Ajuda]Alguem ajuda a tirar warning - .FuneraL. - 08.05.2012

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     if(strcmp(cmdtext,"/ps",true)==0)
     {
          new vehicleid = GetPlayerVehicleID(playerid);
          new State = GetPlayerState(playerid);
          if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
          {
              GameTextForPlayer(playerid,"Concerte seu Carro",4000,6);
              LinkVehicleToInterior(vehicleid,0);
              SetPlayerInterior(playerid,0);
              return SetVehiclePos(vehicleid,2079.0764,-1831.3076,13.382);
          }
          SetPlayerPos(playerid,2079.0764,-1831.3076,13.382);
          SetPlayerInterior(playerid,0);
          GameTextForPlayer(playerid,"Concerte seu Carro",4000,6);
          return 1;
      }
      return 0;
}
Tenta Assim


Re: [Ajuda]Alguem ajuda a tirar warning - Don_Speed - 08.05.2012

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     if(strcmp(cmdtext,"/ps",true)==0)
     {
        new vehicleid = GetPlayerVehicleID(playerid);
        new State = GetPlayerState(playerid);
        if(IsPlayerInAnyVehicle(playerid) && State == PLAYER_STATE_DRIVER)
        {
             GameTextForPlayer(playerid,"Concerte seu Carro",4000,6);
             LinkVehicleToInterior(vehicleid,0);
             SetPlayerInterior(playerid,0);
             return 1;
        }
        SetPlayerPos(playerid,2079.0764,-1831.3076,13.382;
        SetPlayerInterior(playerid,0);
        GameTextForPlayer(playerid,"Concerte seu Carro",4000,6);
        return 1;
     }
     return 0;
}



Re: [Ajuda]Alguem ajuda a tirar warning - Adriano_MQD - 08.05.2012

Vlw tava com erro esse tambйm mas eu achei o erro e agora nao ta dando mas warning vlw +Rep