[Ajuda]Alguem ajuda a tirar warning
#1

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;
}

Reply
#2

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.
Reply
#3

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.

Reply
#4

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
Reply
#5

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;
}
Reply
#6

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


Forum Jump:


Users browsing this thread: 1 Guest(s)