Jump to content
  • 0

Multe warninguri


ImTouchk

Question

Problema intalnita (descriere): multe warninguri de la YSI la compilare, dupa ce am pus /setadmin :|
Ero(area / rile) / warning-(ul / urile): 

C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\..\YSI_Core\y_debug.inc(289) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\..\YSI_Core\y_debug.inc(298) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\..\YSI_Storage\y_amx.inc(419) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\..\YSI_Storage\y_amx.inc(1010) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\..\YSI_Storage\y_amx.inc(1032) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\..\YSI_Storage\y_amx.inc(1049) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(412) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(590) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(617) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(682) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(1079) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(1099) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_malloc/funcs.inc(435) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_malloc/funcs.inc(572) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_inline/impl.inc(1468) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_inline/impl.inc(1735) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_stringhash.inc(306) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_hooks/impl.inc(443) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\y_ini/reading.inc(550) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\gamemodes\mainroleplay.pwn(159) : warning 211: possibly unintended assignment
C:\Users\mugur\Downloads\MAIN-ROLEPLAY\gamemodes\mainroleplay.pwn(461) : warning 203: symbol is never used: "gMyPlayerText"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


21 Warnings.


Liniile de cod / sursa / script-ul(obligatoriu):

CMD:setadmin(playerid, params[])
{
	if(PlayerInfo[playerid][pAdmin] = 6)return SendClientMessage(playerid, 0xFF9900AA, "Nu esti administrator, nu poti folosi comanda. Simplu.");
	if(sscanf(params,"ui",ID,levels)) return SendClientMessage(playerid,0xFF9900AA, "FOLOSESTE: /setadmin [Nume sau ID] [Nivel(1-6)]");//it will show this if you dont use the format properly
	if(levels > 4) return SendClientMessage(playerid,0xFF0000FF,"POTI DA UN NIVEL DE LA 1 LA 6!");//Available levels
	if(!IsPlayerConnected(ID))return SendClientMessage(playerid,0xFF00000,"Utilizatorul selectat nu este inregistrat.");//Detect if the id/partofname is connected
	if(PlayerInfo[ID][pAdmin] == levels) return SendClientMessage(playerid,0xFF0000FF, "EROARE: Persoana selectata are deja acest nivel!");//Detect if the guy is already the level you setted
  	GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//define the playerid name
   	GetPlayerName(ID,pname,MAX_PLAYER_NAME);//define the other person name
   	if(levels == 0)
   	{
    	format(str, sizeof(str),"{FFFFFF}%s {FF0000}ti-a setat nivelul de administrator la {FFFFFF}%d{FF0000}.",Nam,levels);
		SendClientMessage(ID,0xFF9900AA,str);
 		format(str, sizeof(str),"{FF0000}I-ai setat lui {FFFFFF}%s {FF0000}nivelul de administrator la {FFFFFF}%d!",pname,levels);
		SendClientMessage(playerid,0xFF9900AA,str);
   		PlayerInfo[ID][pAdmin] = levels;//this sets the player level
   		return 1;
	}
	format(str, sizeof(str),"{FFFFFF}%s {FF0000}ti-a setat nivelul de administrator {FFFFFF}%d{FF0000}!",Nam,levels);
	SendClientMessage(ID,0xFF9900AA,str);
	format(str, sizeof(str),"{FF0000}I-ai setat lui {FFFFFF}%s {FF0000}nivelul de administrator la {FFFFFF}%d{FF0000}!",pname,levels);
	SendClientMessage(playerid,0xFF9900AA,str);
	PlayerInfo[ID][pAdmin] = levels;
	return 1;
}


Imagini / Video (optional): Nu
Ati incercat sa rezolvati singur?: Da

:D

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0
CMD:setadmin(playerid, params[])
{
	new string1[250]
	if(PlayerInfo[playerid][pAdmin] = 6)return SendClientMessage(playerid, 0xFF9900AA, "Nu esti administring1ator, nu poti folosi comanda. Simplu.");
	if(sscanf(params,"ui",ID,levels)) return SendClientMessage(playerid,0xFF9900AA, "FOLOSESTE: /setadmin [Nume sau ID] [Nivel(1-6)]");//it will show this if you dont use the format properly
	if(levels > 4) return SendClientMessage(playerid,0xFF0000FF,"POTI DA UN NIVEL DE LA 1 LA 6!");//Available levels
	if(!IsPlayerConnected(ID))return SendClientMessage(playerid,0xFF00000,"Utilizatorul selectat nu este inregistring1at.");//Detect if the id/partofname is connected
	if(PlayerInfo[ID][pAdmin] == levels) return SendClientMessage(playerid,0xFF0000FF, "EROARE: Persoana selectata are deja acest nivel!");//Detect if the guy is already the level you setted
  	GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//define the playerid name
   	GetPlayerName(ID,pname,MAX_PLAYER_NAME);//define the other person name
   	if(levels == 0)
   	{
    	format(string1, sizeof(string1),"{FFFFFF}%s {FF0000}ti-a setat nivelul de administring1ator la {FFFFFF}%d{FF0000}.",Nam,levels);
		SendClientMessage(ID,0xFF9900AA,string1);
 		format(string1, sizeof(string1),"{FF0000}I-ai setat lui {FFFFFF}%s {FF0000}nivelul de administring1ator la {FFFFFF}%d!",pname,levels);
		SendClientMessage(playerid,0xFF9900AA,string1);
   		PlayerInfo[ID][pAdmin] = levels;//this sets the player level
   		return 1;
	}
	format(string1, sizeof(string1),"{FFFFFF}%s {FF0000}ti-a setat nivelul de administring1ator {FFFFFF}%d{FF0000}!",Nam,levels);
	SendClientMessage(ID,0xFF9900AA,string1);
	format(string1, sizeof(string1),"{FF0000}I-ai setat lui {FFFFFF}%s {FF0000}nivelul de administring1ator la {FFFFFF}%d{FF0000}!",pname,levels);
	SendClientMessage(playerid,0xFF9900AA,string1);
	PlayerInfo[ID][pAdmin] = levels;
	return 1;
}

Incearca asa !

Link to comment
Share on other sites

  • 0
2 hours ago, Mafia. said:
CMD:setadmin(playerid, params[])
{
	new string1[250]
	if(PlayerInfo[playerid][pAdmin] = 6)return SendClientMessage(playerid, 0xFF9900AA, "Nu esti administring1ator, nu poti folosi comanda. Simplu.");
	if(sscanf(params,"ui",ID,levels)) return SendClientMessage(playerid,0xFF9900AA, "FOLOSESTE: /setadmin [Nume sau ID] [Nivel(1-6)]");//it will show this if you dont use the format properly
	if(levels > 4) return SendClientMessage(playerid,0xFF0000FF,"POTI DA UN NIVEL DE LA 1 LA 6!");//Available levels
	if(!IsPlayerConnected(ID))return SendClientMessage(playerid,0xFF00000,"Utilizatorul selectat nu este inregistring1at.");//Detect if the id/partofname is connected
	if(PlayerInfo[ID][pAdmin] == levels) return SendClientMessage(playerid,0xFF0000FF, "EROARE: Persoana selectata are deja acest nivel!");//Detect if the guy is already the level you setted
  	GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//define the playerid name
   	GetPlayerName(ID,pname,MAX_PLAYER_NAME);//define the other person name
   	if(levels == 0)
   	{
    	format(string1, sizeof(string1),"{FFFFFF}%s {FF0000}ti-a setat nivelul de administring1ator la {FFFFFF}%d{FF0000}.",Nam,levels);
		SendClientMessage(ID,0xFF9900AA,string1);
 		format(string1, sizeof(string1),"{FF0000}I-ai setat lui {FFFFFF}%s {FF0000}nivelul de administring1ator la {FFFFFF}%d!",pname,levels);
		SendClientMessage(playerid,0xFF9900AA,string1);
   		PlayerInfo[ID][pAdmin] = levels;//this sets the player level
   		return 1;
	}
	format(string1, sizeof(string1),"{FFFFFF}%s {FF0000}ti-a setat nivelul de administring1ator {FFFFFF}%d{FF0000}!",Nam,levels);
	SendClientMessage(ID,0xFF9900AA,string1);
	format(string1, sizeof(string1),"{FF0000}I-ai setat lui {FFFFFF}%s {FF0000}nivelul de administring1ator la {FFFFFF}%d{FF0000}!",pname,levels);
	SendClientMessage(playerid,0xFF9900AA,string1);
	PlayerInfo[ID][pAdmin] = levels;
	return 1;
}

Incearca asa !

La o verificare se folosesc două semne de "==" un singur egal înseamnă atribuire.

**********************************

Servicii Scripting de calitate:

*********************************

Future Project: ExpertGame

*********************************

Link to comment
Share on other sites

  • 0
if(PlayerInfo[playerid][pAdmin] = 6)return SendClientMessage(playerid, 0xFF9900AA, "Nu esti administring1ator, nu poti folosi comanda. Simplu.");

??????????????????????????????????????????????????????????????????????????????????????????????????????????

Clar ai dat pe undeva ctrh+h sa modifici, ma rog asta nu e problema in linia asta

if(PlayerInfo[playerid][pAdmin] == 6) return SendClientMessage(playerid, 0xFF9900AA, "Nu esti administring1ator, nu poti folosi comanda. Simplu.");
Link to comment
Share on other sites

  • 0
On 14.09.2016 at 9:51 AM, Mafia. said:
CMD:setadmin(playerid, params[])
{
	new string1[250]
	if(PlayerInfo[playerid][pAdmin] = 6)return SendClientMessage(playerid, 0xFF9900AA, "Nu esti administring1ator, nu poti folosi comanda. Simplu.");
	if(sscanf(params,"ui",ID,levels)) return SendClientMessage(playerid,0xFF9900AA, "FOLOSESTE: /setadmin [Nume sau ID] [Nivel(1-6)]");//it will show this if you dont use the format properly
	if(levels > 4) return SendClientMessage(playerid,0xFF0000FF,"POTI DA UN NIVEL DE LA 1 LA 6!");//Available levels
	if(!IsPlayerConnected(ID))return SendClientMessage(playerid,0xFF00000,"Utilizatorul selectat nu este inregistring1at.");//Detect if the id/partofname is connected
	if(PlayerInfo[ID][pAdmin] == levels) return SendClientMessage(playerid,0xFF0000FF, "EROARE: Persoana selectata are deja acest nivel!");//Detect if the guy is already the level you setted
  	GetPlayerName(playerid,Nam, MAX_PLAYER_NAME);//define the playerid name
   	GetPlayerName(ID,pname,MAX_PLAYER_NAME);//define the other person name
   	if(levels == 0)
   	{
    	format(string1, sizeof(string1),"{FFFFFF}%s {FF0000}ti-a setat nivelul de administring1ator la {FFFFFF}%d{FF0000}.",Nam,levels);
		SendClientMessage(ID,0xFF9900AA,string1);
 		format(string1, sizeof(string1),"{FF0000}I-ai setat lui {FFFFFF}%s {FF0000}nivelul de administring1ator la {FFFFFF}%d!",pname,levels);
		SendClientMessage(playerid,0xFF9900AA,string1);
   		PlayerInfo[ID][pAdmin] = levels;//this sets the player level
   		return 1;
	}
	format(string1, sizeof(string1),"{FFFFFF}%s {FF0000}ti-a setat nivelul de administring1ator {FFFFFF}%d{FF0000}!",Nam,levels);
	SendClientMessage(ID,0xFF9900AA,string1);
	format(string1, sizeof(string1),"{FF0000}I-ai setat lui {FFFFFF}%s {FF0000}nivelul de administring1ator la {FFFFFF}%d{FF0000}!",pname,levels);
	SendClientMessage(playerid,0xFF9900AA,string1);
	PlayerInfo[ID][pAdmin] = levels;
	return 1;
}

Incearca asa !

C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\..\YSI_Core\y_debug.inc(289) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\..\YSI_Core\y_debug.inc(298) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\..\YSI_Storage\y_amx.inc(419) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\..\YSI_Storage\y_amx.inc(1010) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\..\YSI_Storage\y_amx.inc(1032) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\..\YSI_Storage\y_amx.inc(1049) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(412) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(590) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(617) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(682) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(1079) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Core\y_utils.inc(1099) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_malloc/funcs.inc(435) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_malloc/funcs.inc(572) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_inline/impl.inc(1468) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_inline/impl.inc(1735) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_stringhash.inc(306) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\..\YSI_Coding\y_hooks/impl.inc(443) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\pawno\include\YSI\..\YSI_Storage\y_ini/reading.inc(550) : warning 219: local variable "str" shadows a variable at a preceding level
C:\Users\a\Desktop\MAIN-ROLEPLAY\gamemodes\mainroleplay.pwn(119) : warning 213: tag mismatch
C:\Users\a\Desktop\MAIN-ROLEPLAY\gamemodes\mainroleplay.pwn(120) : warning 213: tag mismatch
C:\Users\a\Desktop\MAIN-ROLEPLAY\gamemodes\mainroleplay.pwn(200) : warning 211: possibly unintended assignment
C:\Users\a\Desktop\MAIN-ROLEPLAY\gamemodes\mainroleplay.pwn(228) : warning 213: tag mismatch
C:\Users\a\Desktop\MAIN-ROLEPLAY\gamemodes\mainroleplay.pwn(228) : warning 211: possibly unintended assignment
C:\Users\a\Desktop\MAIN-ROLEPLAY\gamemodes\mainroleplay.pwn(236) : warning 213: tag mismatch
C:\Users\a\Desktop\MAIN-ROLEPLAY\gamemodes\mainroleplay.pwn(238) : warning 213: tag mismatch
C:\Users\a\Desktop\MAIN-ROLEPLAY\gamemodes\mainroleplay.pwn(238) : warning 211: possibly unintended assignment
C:\Users\a\Desktop\MAIN-ROLEPLAY\gamemodes\mainroleplay.pwn(246) : warning 213: tag mismatch
C:\Users\a\Desktop\MAIN-ROLEPLAY\gamemodes\mainroleplay.pwn(522) : warning 211: possibly unintended assignment
C:\Users\a\Desktop\MAIN-ROLEPLAY\gamemodes\mainroleplay.pwn(588) : warning 203: symbol is never used: "AdminInfo"
C:\Users\a\Desktop\MAIN-ROLEPLAY\gamemodes\mainroleplay.pwn(588) : warning 203: symbol is never used: "gMyPlayerText"
C:\Users\a\Desktop\MAIN-ROLEPLAY\gamemodes\mainroleplay.pwn(588) : warning 203: symbol is never used: "str"
Pawn compiler 3.2.3664	 	 	Copyright (c) 1997-2006, ITB CompuPhase


32 Warnings.

 

:D

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.