Why wrong they?
#1

Why wrong they?

Код:
D:\WITData Inc\Pawno\WITData Server Resmi Mod\witdata.pwn(2040) : warning 219: local variable "pName" shadows a variable at a preceding level
D:\WITData Inc\Pawno\WITData Server Resmi Mod\witdata.pwn(2040) : warning 219: local variable "str" shadows a variable at a preceding level
D:\WITData Inc\Pawno\WITData Server Resmi Mod\witdata.pwn(2056) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
D:\WITData Inc\Pawno\WITData Server Resmi Mod\witdata.pwn(2056) : warning 219: local variable "str" shadows a variable at a preceding level
D:\WITData Inc\Pawno\WITData Server Resmi Mod\witdata.pwn(2072) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
D:\WITData Inc\Pawno\WITData Server Resmi Mod\witdata.pwn(2072) : warning 219: local variable "str" shadows a variable at a preceding level
D:\WITData Inc\Pawno\WITData Server Resmi Mod\witdata.pwn(2085) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
D:\WITData Inc\Pawno\WITData Server Resmi Mod\witdata.pwn(2085) : warning 219: local variable "str" shadows a variable at a preceding level
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


8 Warnings.
First wrong code:
Код:
  if(strcmp(cmdtext, "/koruma", true) == 0) {
	SendClientMessage(playerid, COLOR_YELLOW, "Koruma oldun! Kendine bir patron bulabilir ve para karsiligi calisabilirsin.");
	SetPlayerPos(playerid, 1873.952, -1239.715, 15);
	SetPlayerSkin(playerid,163);
	GivePlayerWeapon(playerid,29,1500);
	GivePlayerWeapon(playerid, 24, 100);
	GivePlayerWeapon(playerid, 16, 10);
	SetPlayerInterior(playerid,0);
	new pName[30], str[256];
	GetPlayerName(playerid, pName, 30);
	format(str, 256, "%s adli oyuncu koruma oldu [/koruma]", pName);
	SendClientMessageToAll(0x0000BBAA, str);
	SetPlayerColor(playerid,0xAFAFAFAA);

}
Second wrong code:
Код:
if(strcmp(cmdtext, "/polis", true) == 0) {
SendClientMessage(playerid, COLOR_YELLOW, "Polis oldun!Kanun kacaklari ile ilgilenmek senin gцrevin!");
SetPlayerPos(playerid, 1535.499, -1670.019, 15);
SetPlayerSkin(playerid,280);
GivePlayerWeapon(playerid,29,1500);
GivePlayerWeapon(playerid, 24, 100);
GivePlayerWeapon(playerid, 16, 10);
SetPlayerInterior(playerid,0);
	new PlayerName[30], str[256];
	GetPlayerName(playerid, PlayerName, 30);
	format(str, 256, "%s adli oyuncu polis oldu [/polis]", PlayerName);
	SendClientMessageToAll(0x0000BBAA, str);
	SetPlayerColor(playerid,0x0000BBAA);

}
Third wrong code:
Код:
if(strcmp(cmdtext, "/ceteuyesi", true) == 0) {
SendClientMessage(playerid, COLOR_YELLOW, "Cete ьyesi oldun! Sehirde teror estirmek senin isin!");
SetPlayerPos(playerid, 2467.194, -1673.966, 15);
SetPlayerSkin(playerid,107);
GivePlayerWeapon(playerid,27,1500);
GivePlayerWeapon(playerid, 30, 500);
GivePlayerWeapon(playerid, 16, 10);
SetPlayerInterior(playerid,0);
	new PlayerName[30], str[256];
	GetPlayerName(playerid, PlayerName, 30);
	format(str, 256, "%s adli oyuncu cete uyesi oldu [/ceteuyesi]", PlayerName);
	SendClientMessageToAll(0x0000BBAA, str);
	SetPlayerColor(playerid,0x33AA33AA);

}
Fourth wrong code:
Код:
	if(strcmp(cmdtext, "/taksisoforu", true) == 0) {
	SendClientMessage(playerid, COLOR_YELLOW, "Taksi soforu oldun! Para karsiligi oyunculari istedikleri yere gotur!");
	SetPlayerPos(playerid, 1280.5682,-1338.2859,13.3725);
	SetPlayerSkin(playerid,142);
	SetPlayerInterior(playerid,0);
	new PlayerName[30], str[256];
	GetPlayerName(playerid, PlayerName, 30);
	format(str, 256, "%s adli oyuncu taksi sofor'u oldu [/taksisoforu]", PlayerName);
	SendClientMessageToAll(0x0000BBAA, str);
	SetPlayerColor(playerid,0xFFFF00AA);
}
WHY WRONG THEY?

Note: I'm sorry for my bad english ..
Reply
#2

You more then likey have them at the top of your script.
Reply
#3

It's header:
Код:
//Include
#include <a_samp>
#include <a_objects>
#include <a_players>
#include <a_sampdb>
#include <a_vehicles>
#include <float>
#include <file>
#include <string>
#include <dini>
#include <dudb>

//Forward
forward SetPlayerTeamFromClass(playerid, classid);
forward SetPlayerToTeamColor(playerid);
forward ColgarTelefonino(playerid);
forward Llamando(callerid,receiverid);
forward CaidaDeFicha(playerid);
forward Nupdate ();
forward rweather();
forward clock();

//Define
#define COLOR_GRAD1 0xB4B5B7FF
#define COLOR_GRAD2 0xBFC0C2FF
#define COLOR_GRAD3 0xCBCCCEFF
#define COLOR_GRAD4 0xD8D8D8FF
#define COLOR_GRAD5 0xE3E3E3FF
#define COLOR_GRAD6 0xF0F0F0FF
#define COLOR_GREY 0xAFAFAFAA
#define COLOR_GREEN 0x33AA33AA
#define COLOR_RED 0xAA3333AA
#define COLOR_YELLOW 0xFFFF00AA
#define COLOR_WHITE 0xFFFFFFAA
#define COLOR_FADE1 0xE6E6E6E6
#define COLOR_FADE2 0xC8C8C8C8
#define COLOR_FADE3 0xAAAAAAAA
#define COLOR_FADE4 0x8C8C8C8C
#define COLOR_FADE5 0x6E6E6E6E
#define COLOR_PURPLE 0xC2A2DAAA
#define COLOR_DBLUE 0x2641FEAA
#define COLOR_ALLDEPT 0xFF8282AA
#define COLOR_SARI 0xFFFF00AA

#define COLOR_CALL 0xBFC0C2FF

#define TAKIM_SIVIL 0
#define TAKIM_SIVIL_RENGI 0xB4B5B7FF

#define MAX_PROPERTIES 100
#define MAX_PROPERTIES_PER_PLAYER 4
#define UNBUYABLETIME 15 //Tekrar satin alinabilmesi icin gereken zaman

#define LIBRE 0
#define ESTA_LLAMANDO 1
#define LO_ESTAN_LLAMANDO 2
#define ESTA_HABLANDO 3

//------------------------------------------------------------------------------
//        KONUSMA UCRETLERI
#define PRECIO_FICHA 2
#define COSTO_SMS 50
//This is the distance from where ppl can here what you say to the phone, set it
//to -1 if you don't want ppl to hear phone calls (NON REALISTIC)
#define DIST 20.0
//------------------------------------------------------------------------------

#define DEAD_TIMER_ID -666

#define ENABLE_EVGIRIS_SYSTEM 1
#define ENABLE_MAP_ICON_STREAMER 1

#define EVKAYIT_COMMAND "/evkayit"
#define EVGIRIS_COMMAND "/evgiris"

#define COLOR_SYSTEM 0xEFEFF7AA
#define green 0x33FF33AA
#define blue 0x00FFFFAA

//Pragma
#pragma tabsize 0

//New & Enum
new PLAYERLIST_authed[MAX_PLAYERS];
new Ntimer;
new Text:Ntick;
new news[][] =
{
"WiTData Resmi Sunucu Modu",
"by WickWoody",
"http://www.arex.co.nr",
"WiT Coding - C++ / VBasic/.NET"
};
new CellState[MAX_PLAYERS];
new AuxiliarTel[MAX_PLAYERS];
new CellTime[MAX_PLAYERS];
new TimerLLamando[MAX_PLAYERS]={DEAD_TIMER_ID,...};
new TimerCaidaFicha[MAX_PLAYERS]={DEAD_TIMER_ID,...};
new Numero_Tel[MAX_PLAYERS];
//Modifiyeli araclar
new arac1;
new arac2;
new arac3;
new arac4;
new arac5;
new arac6;
new arac7;
new arac8;
new arac9;
new arac10;
new arac11;
new arac12;
new arac13;
new arac14;
new arac15;
new arac16;
new arac17;
new arac18;
new arac19;
new arac20;
new arac21;
new arac22;
new arac23;
new arac24;
new arac25;
new arac26;
new arac27;
new arac28;
new arac29;
new arac30;
new arac31;
new arac32;
new arac33;
new arac34;
new arac35;
new arac36;
new arac37;
new arac38;
//Memoria telefono -------------------------------------------------------------
enum Memory_slot_salida{
	numero_telefono,
	Nombre[MAX_PLAYER_NAME],
	costo
	};
new MemorySalida[MAX_PLAYERS][5][Memory_slot_salida];

enum Memory_slot_entrada{
	numero_telefono2,
	Nombre2[MAX_PLAYER_NAME]
	};
new MemoryEntrada[MAX_PLAYERS][5][Memory_slot_entrada];
//Memoria SMS ------------------------------------------------------------------
enum sms_slot_enviados{
	numeroSMS1,
	NombreSMS1[MAX_PLAYER_NAME],
	SMS1[120]
	};
new SMSEnviados[MAX_PLAYERS][5][sms_slot_enviados];
enum sms_slot_recibidos{
	numeroSMS2,
	NombreSMS2[MAX_PLAYER_NAME],
	SMS2[120]
	};
new SMSRecibidos[MAX_PLAYERS][5][sms_slot_recibidos];
new PropertiesAmount;
new MP;
enum propinfo
{
	PropName[64],
	Float:PropX,
	Float:PropY,
	Float:PropZ,
	PropIsBought,
	PropUnbuyableTime,
	PropOwner[MAX_PLAYER_NAME],
	PropValue,
	PropEarning,
	PickupNr,
}
new PropInfo[MAX_PROPERTIES][propinfo]; //CarInfo
new PlayerProps[MAX_PLAYERS];
new EarningsForPlayer[MAX_PLAYERS];
new Logged[MAX_PLAYERS];
new gTeam[MAX_PLAYERS];
new kapi;
new Peds[205][1] = {
{247},
{248},{100},{256},{263},{262},{261},{260},{259},{258},{257},{256},{255},
{253},{252},{251},{249},{246},{245},{244},{243},{242},{241},{240},{239},
{238},{237},{236},{235},{234},{233},{232},{231},{230},{229},
{226},{225},{173},{174},{175},{224},{223},{222},{221},{220},{219},{218},
{217},{216},{215},{214},{213},{212},{211},{210},{209},
{207},{206},{205},{204},{203},{202},{201},{200},{199},{198},{197},{196},
{195},{194},{193},{192},{191},{190},{189},{185},{184},{183},
{182},{181},{180},{179},{178},{176},{172},{170},{168},{167},{162},
{161},{160},{159},{158},{157},{156},{155},{154},{153},{152},{151},
{146},{145},{144},{143},{142},{141},{140},{139},{138},{137},{136},{135},
{134},{133},{132},{131},{130},{129},{128},{254},{99},{97},{96},{95},{94},
{92},{90},{89},{88},{87},{85},{84},{83},{82},{81},{80},{79},{78},{77},{76},
{75},{73},{72},{69},{68},{67},{66},{64},{63},{62},{58},{57},{56},{55},
{54},{53},{52},{51},{50},{49},{45},{44},{43},{41},{39},{38},{37},{36},{35},
{34},{33},{32},{31},{30},{29},{28},{27},{26},{25},{24},{23},{22},{21},{20},
{19},{18},{17},{16},{15},{14},{13},{12},{11},{10},{1},{2},
{290},
{291},
{292},
{293},
{187},
{296},
{297},
{298},
{299}
};
Reply
#4

So now its the oppisite away round put at top and delete in command. Or use these and delete those.

pawn Код:
//top

playerName[MAX_PLAYER_NAME];
MyString[128];

//In your command change messages example:

GetPlayerName(playerid, playerName, sizeof(playerName));
format(MyString, sizeof(MyString), "%s adli oyuncu koruma oldu [/koruma]", playerName);
SendClientMessageToAll(0x0000BBAA, MyString);
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)