Posts: 413
Threads: 59
Joined: Sep 2013
Код:
C:\Users\***\Desktop\LA-GW\gamemodes\MWB2.pwn(975) : warning 225: unreachable code
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
1 Warning.
Код:
ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Private Class\nSniper Class\nEngineer Class\nMedic Class\nPilot Class\nSpy Class", "Choose","");
Can anybody help me?
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
Is there any return above it? If so, remove it and add it after ShowPlayerDialog.
Otherwise show 2 lines before/below.
Posts: 413
Threads: 59
Joined: Sep 2013
Quote:
Originally Posted by Konstantinos
Is there any return above it? If so, remove it and add it after ShowPlayerDialog.
Otherwise show 2 lines before/below.
|
Код:
//Fuel System
td_fuel[playerid] = TextDrawCreate(45,324,"Fuel: 100"); //create the textdraw at position
TextDrawBackgroundColor(td_fuel[playerid],COLOR_GREEN); //setting an nice backgroundcolor
TextDrawFont(td_fuel[playerid],3); //font type of textdraw
TextDrawLetterSize(td_fuel[playerid],0.699999,1.700000); //size...
TextDrawColor(td_fuel[playerid],0x000000ff); //color
TextDrawSetShadow(td_fuel[playerid],3); //dropping the shadow
return 1;
//Class System
ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Private Class\nSniper Class\nEngineer Class\nMedic Class\nPilot Class\nSpy Class", "Choose","");
if(gPlayerClass[playerid] == PRIVATE)//This is for the First soldier class.
{
TogglePlayerControllable(playerid, 1);
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 31, 200);//m4
GivePlayerWeapon(playerid, 25, 100);//mp5
GivePlayerWeapon(playerid, 24, 70);//deagle
}
Sorry for late reply.
Posts: 413
Threads: 59
Joined: Sep 2013
Quote:
Originally Posted by pds2k12
At the first look, I can see the problem, the problem is why is there a return 1;? but there's no }(brackets), showing us the full callback code, would really help fixing you the problem, your code would look like this.
pawn Код:
//Fuel System td_fuel[playerid] = TextDrawCreate(45,324,"Fuel: 100"); //create the textdraw at position TextDrawBackgroundColor(td_fuel[playerid],COLOR_GREEN); //setting an nice backgroundcolor TextDrawFont(td_fuel[playerid],3); //font type of textdraw TextDrawLetterSize(td_fuel[playerid],0.699999,1.700000); //size... TextDrawColor(td_fuel[playerid],0x000000ff); //color TextDrawSetShadow(td_fuel[playerid],3); //dropping the shadow // commented return 1; //Class System ShowPlayerDialog(playerid, 999, DIALOG_STYLE_LIST, "{6EF83C}Choose A Class:", "Private Class\nSniper Class\nEngineer Class\nMedic Class\nPilot Class\nSpy Class", "Choose","");
if(gPlayerClass[playerid] == PRIVATE)//This is for the First soldier class. { TogglePlayerControllable(playerid, 1); ResetPlayerWeapons(playerid); GivePlayerWeapon(playerid, 31, 200);//m4 GivePlayerWeapon(playerid, 25, 100);//mp5 GivePlayerWeapon(playerid, 24, 70);//deagle }
|
Now this:
Код:
[18:27:20] Script[gamemodes/MWB2.amx]: Run time error 19: "File or function is not found"
But when I compile I get no errors!
Posts: 413
Threads: 59
Joined: Sep 2013
Quote:
Originally Posted by pds2k12
|
Код:
[18:34:48] Error: Function not registered: 'Streamer_CallbackHook'
[18:34:48] Script[gamemodes/MWB2.amx]: Run time error 19: "File or function is not found"
??
Posts: 413
Threads: 59
Joined: Sep 2013
Quote:
Originally Posted by pds2k12
Download the latest streamer plugin and re-compile the script with the new plugin and include
|
Thank you +REP!