[Ajuda] Warning
#1

Fala galera boa do forum, por "recomendaзхes" baixei o GM PPC_Trucking para estudos, so q ele veio com 4 warnings, 3 jб removi, mais tem 1 que nгo estou conseguindo, se puderem me ajudar, fico grato...
PHP код:
//Warning
H:\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(182) : warning 225unreachable code 
PHP код:
if (APlayerData[playerid][RulesRead] == false) return SendClientMessage(playerid0xFFFFFFFF"{FF0000}You haven't accepted the {FFFF00}/rules{FF0000} yet"); 
Abraзos...
Reply
#2

Quote:
Originally Posted by matheusspohr
Посмотреть сообщение
Fala galera boa do forum, por "recomendaзхes" baixei o GM PPC_Trucking para estudos, so q ele veio com 4 warnings, 3 jб removi, mais tem 1 que nгo estou conseguindo, se puderem me ajudar, fico grato...
PHP код:
//Warning
H:\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(182) : warning 225unreachable code 
PHP код:
if (APlayerData[playerid][RulesRead] == false) return SendClientMessage(playerid0xFFFFFFFF"{FF0000}You haven't accepted the {FFFF00}/rules{FF0000} yet"); 
Abraзos...
manda as linhas antes dessa deve haver algum return
Reply
#3

Manda o comando todo ..
Reply
#4

Quote:
Originally Posted by matheusspohr
Посмотреть сообщение
Fala galera boa do forum, por "recomendaзхes" baixei o GM PPC_Trucking para estudos, so q ele veio com 4 warnings, 3 jб removi, mais tem 1 que nгo estou conseguindo, se puderem me ajudar, fico grato...
PHP код:
//Warning
H:\PPC_Trucking6\gamemodes\PPC_Trucking.pwn(182) : warning 225unreachable code 
PHP код:
if (APlayerData[playerid][RulesRead] == false) return SendClientMessage(playerid0xFFFFFFFF"{FF0000}You haven't accepted the {FFFF00}/rules{FF0000} yet"); 
Abraзos...
Tente dessa forma:

PHP код:
if (APlayerData[playerid][RulesRead] == false)
SendClientMessage(playerid0xFFFFFFFF"{FF0000}You haven't accepted the {FFFF00}/rules{FF0000} yet"); 
Reply
#5

Nao й comando, isto fica na public onplayerconnect, postei a public no Pastebin:

Public

Abraзos.
Reply
#6

Quote:
Originally Posted by matheusspohr
Посмотреть сообщение
Nao й comando, isto fica na public onplayerconnect, postei a public no Pastebin:

Public

Abraзos.
E quem disse que estou postando algum comando O que postei estб na OnPlayerConnect, faзa o que eu disse e veja se funciona.

Quando vc coloca o "If" vc jб da a condiзгo "SE", ou seja, vc declara que "SE" o playr nгo leu as regras, automaticamente serб mostrada a mensagem а ele, nгo precisa fazer o "return".
Reply
#7

E tem mais um "erro" ali na sua OnPlayerConnect:

Quote:

// MissionText TextDraw setup
APlayerData[playerid][MissionText] = TextDrawCreate(321.0, 430.0, " ");// Setup the missiontext at the bottom of the screen
TextDrawAlignment(APlayerData[playerid][MissionText], 2); // Align the missiontext to the center
TextDrawUseBox(APlayerData[playerid][MissionText], 1); // Set the missiontext to display inside a box
TextDrawBoxColor(APlayerData[playerid][MissionText], 0x00000066); // Set the box color of the missiontext

return 1;

// Display a message if the player hasn't accepted the rules yet
if(APlayerData[playerid][RulesRead] == false) return SendClientMessage(playerid, 0xFFFFFFFF, "Vocк Ainda Nгo Aceitou As Regras...");
return 1;
Esses dois returns em vermelho sгo desnecessarios.
Reply
#8

Quote:
Originally Posted by Vegassilva
Посмотреть сообщение
Manda o comando todo ..
Foi Este Que Falo Para Mandar O Comando Todo, sei oque significa "If"...

Bom, retirei o 1є Return que vocк falou, e ja esta funcionando, Obrigado...

Abraзos.
Reply
#9

Quote:
Originally Posted by matheusspohr
Посмотреть сообщение
Foi Este Que Falo Para Mandar O Comando Todo, sei oque significa "If"...

Bom, retirei o 1є Return que vocк falou, e ja esta funcionando, Obrigado...

Abraзos.
Desculpe, й que eu estava postando, pra mim ainda nгo havia aparecido os outros 2 posts. Verifique se o outro return "extra" nгo vai bugar o restante depois (as missiontext, no caso)
Reply
#10

Bom, eu acho que nгo pois:
PHP код:
if (APlayerData[playerid][RulesRead] == false)//Verifica Se O Player 'X' Leu As Regras
return // Vai retornar
SendClientMessage(playerid0xFFFFFFFF"{FF0000}You haven't accepted the {FFFF00}/rules{FF0000} yet");//Mensagem Ao Player 'X' Na cor 'Branca'

//Apуs:
     
Return 1;
}
//Apуs isto ele irб retornar o fim de uma parte da Callback 
Abraзos.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)