help with this warnings please?
#1

C:\Users\User\Downloads\diverse\TESTTESTTESTTESTTE ST\ruse unic new\gamemodes\begamer.pwn(7037) : warning 225: unreachable code
C:\Users\User\Downloads\diverse\TESTTESTTESTTESTTE ST\ruse unic new\gamemodes\begamer.pwn(29573) : warning 225: unreachable code
C:\Users\User\Downloads\diverse\TESTTESTTESTTESTTE ST\ruse unic new\gamemodes\begamer.pwn(29576) : warning 225: unreachable code
C:\Users\User\Downloads\diverse\TESTTESTTESTTESTTE ST\ruse unic new\gamemodes\begamer.pwn(78706) : warning 203: symbol is never used: "interiorr"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Warnings.

code for warnings
Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
new string[182];
new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[182];
new tmp[182];
new giveplayerid, moneys, idx;
new idcar = GetPlayerVehicleID(playerid);
cmd = strtok(cmdtext, idx);
//tmp = strtok(cmdtext, idx);
printf("%s: %s ", PlayerData[playerid][pNume], cmd);
if(gPlayerLogged[playerid] == 0)
{
return 1;

(line.29573) if(strcmp("/buyvehicle", cmdtext, true, 10) == 0)
{
return 1;
(line.29576) if(IsPlayerInRangeOfPoint(playerid, 10.0, 919.4584,-1252.2156,16.2109))
{
ShowPlayerDialog(playerid,DIALOG_CATEGORY,DIALOG_S TYLE_LIST ,"1. Choose a category","Aircrafts\nBikes\nConvertibles\nIndustr ial\nLowriders\nOff Road\nSaloons\nSport Vehicles\nStation Wagons\nBoats\nUnique Vehicles","Next","Cancel");
return 1;
}
else { SendClientMessage(playerid, COLOR_GREY, "Error: {FFFFFF}You are not at the vehicle dealership."); return 1; } // It will return that message if the player isn't at the dealership
}

and for the warning in the line 7037
Quote:

(here is) if(killerid != INVALID_PLAYER_ID)
{
new name[MAX_PLAYER_NAME];
new string[182];
new playercash;
new victimteam;
new Floatx,Floaty,Floatz;
new killerteam;
if(JoinedDeathMatch[killerid] == 1 || JoinedDeathMatch[killerid] == 2)
{
return 1;
}

Reply
#2

(line.29573) if(strcmp("/buyvehicle", cmdtext, true, 10) == 0)
{
(line.29576) if(IsPlayerInRangeOfPoint(playerid, 10.0, 919.4584,-1252.2156,16.2109))
{
ShowPlayerDialog(playerid,DIALOG_CATEGORY,DIALOG_S TYLE_LIST ,"1. Choose a category","Aircrafts\nBikes\nConvertibles\nIndustr ial\nLowriders\nOff Road\nSaloons\nSport Vehicles\nStation Wagons\nBoats\nUnique Vehicles","Next","Cancel");
}
else { SendClientMessage(playerid, COLOR_GREY, "Error: {FFFFFF}You are not at the vehicle dealership."); return 1; } // It will return that message if the player isn't at th

I cant really help with the last one but if i helped +rep
Reply
#3

For the Unreachable Code you're already returning a value 'return 1;' in the middle of the code... so the code below wont be recognised by the compiler...
Reply
#4

For the command text:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[182];
new playermoney;
new sendername[MAX_PLAYER_NAME];
new giveplayer[MAX_PLAYER_NAME];
new playername[MAX_PLAYER_NAME];
new cmd[182];
new tmp[182];
new giveplayerid, moneys, idx;
new idcar = GetPlayerVehicleID(playerid);
cmd = strtok(cmdtext, idx);
//tmp = strtok(cmdtext, idx);
printf("%s: %s ", PlayerData[playerid][pNume], cmd);
if(strcmp("/buyvehicle", cmdtext, true, 10) == 0)
{
if(gPlayerLogged[playerid] == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 10.0, 919.4584,-1252.2156,16.2109))
{
ShowPlayerDialog(playerid,DIALOG_CATEGORY,DIALOG_S TYLE_LIST ,"1. Choose a category","Aircrafts\nBikes\nConvertibles\nIndustr ial\nLowriders\nOff Road\nSaloons\nSport Vehicles\nStation Wagons\nBoats\nUnique Vehicles","Next","Cancel");
}
else
{
SendClientMessage(playerid, COLOR_GREY, "Error: {FFFFFF}You are not at the vehicle dealership."); return 1; }
}
}
}
return 1;
}
And for the other codes:

pawn Код:
(here is) if(killerid != INVALID_PLAYER_ID)
{
new name[MAX_PLAYER_NAME];
new string[182];
new playercash;
new victimteam;
new Floatx,Floaty,Floatz;
new killerteam;
if(JoinedDeathMatch[killerid] == 1 || JoinedDeathMatch[killerid] == 2)
{
//yourthingshere
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)