SA-MP Forums Archive
Solucion de errores. - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: Solucion de errores. (/showthread.php?tid=537663)



Solucion de errores. - Jeree10 - 17.09.2014

Hola bueno tengo unos cuantos warnings y quiero corregirlos pero no puedo dejo 2 para ver si alguien me ayuda gracias de ante mano.

Код:
(47017) : warning 203: symbol is never used: "playerid"
Linea:
Код:
 new string[256], playerid
Codigo completo

Код:
function Tutorial_Inside(i) // Tutorial optimizado
{
    new string[256], playerid; //esta es la linea del error
	if(TutStep[i] == 1)
	{
 		if(TutTime[i] >= 1)
		{
			switch (TutTime[i])
			{
   				case 1:
				{
                    PuedeP[i] = 0;
				    TextDrawHideForPlayer(i, TextTut[i]);
					for(new p = 1; p < 3; p++)
					{
						TextDrawHideForPlayer(i, TutTxt[p]);
					}
              		gOoc[i] = 0; 	gNews[i] = 0;
					gFam[i] = 0; 	TutStep[i] = 0;
					gNewbie[i]=0;	 Muted[i] = 0;
					TutTime[i] = 0;
		           	SetPosEx(i, 1723.2433,-1870.8593,13.5645,0,0,0);
         	   	    format(string, sizeof(string),       "Felicitaciones {00CCFF}%s{FFFFFF}, tu cuenta fue creada correctamente.", Nombre);
         	   	    SendClientMessage(i, COLOR_WHITE,string);
		           	SendClientMessage(i, COLOR_AZULL, "Estamos en constante crecimiento. Puedes publicar tus sugerencias en el foro.");
		           	SendClientMessage(i, COLOR_WHITE, "Si tienes alguna inquietud usa, {DBED15}/ayuda {FFFFFF}para recibir ayuda.");
		           	SendClientMessage(i, COLOR_WHITE, "Para poder recibir ayuda de otros usuarios usa, {F1F104}/d[pregunta].");
		           	Info[i][pWRestricted] = -0;
                    Info[i][pTut] = 1;
              		Info[i][pTimePayDay] = 1;
	    		    Info[i][pLevel] = 1;
	    		    Info[i][pNMute] = 0;
		           	TogglePlayerControllable(i, 1);
		           	SetPlayerVirtualWorld(i, 0);
		           	ClearAnimations(i);
		            GivePlayerCash(i, 6000);
		            SetCameraBehindPlayer(i);
		            OnPlayerSavedStats(i);
		            TextDrawShowForPlayer(i, RexZone);
				}
			}
		}
	}
	return 1;
}



Respuesta: Solucion de errores. - JeffreyG - 17.09.2014

Borra el playerid, deja eso asн...

pawn Код:
new string[256];
Y listo.


Re: Solucion de errores. - Jeree10 - 17.09.2014

Pero eso no afecta el codigo?


Respuesta: Re: Solucion de errores. - JeffreyG - 17.09.2014

Quote:
Originally Posted by Jeree10
Посмотреть сообщение
Pero eso no afecta el codigo?
No, esa warning quiere decir que en el cуdigo no estбs usando la variable "playerid", por lo tanto se puede eliminar.


Re: Solucion de errores. - Jeree10 - 17.09.2014

Gracias y con este?
Код:
(49842) : warning 203: symbol is never used: "ReadyToCapture"
codigo:
Код:
ReadyToCapture(pointid)
{
	new string[128];
	//if(Points[pointid][Type] == 3 && Points[pointid][Type] == 4) return 1;
	format(string, sizeof(string), "%s estб disponible para capturar! En el punto escribe /capturar!", Points[pointid][Name]);
	Points[pointid][CaptureProccess] = Create3DTextLabel(string, COLOR_LIGHTBLUE, Points[pointid][Pointx], Points[pointid][Pointy], Points[pointid][Pointz]+0.6, 10.0, 0, 0);
	Points[pointid][CaptureProccessEx] = 1;
	return 1;
}



Respuesta: Solucion de errores. - Zume - 17.09.2014

https://translate.******.com.sv/#en/...dyToCapture%22


Respuesta: Solucion de errores. - JeffreyG - 17.09.2014

Lo mismo que la anterior, ahн te dice que "ReadyToCapture" no se estб utilizando nunca en el cуdigo.


Re: Solucion de errores. - Jeree10 - 17.09.2014

Gracias logrй sacar 2 warning mas.
esto porque sera.
Код:
(20088) : warning 202: number of arguments does not match definition
linea:
Код:
                           GivePlayerCash(playerid, PlayerVehicleInfo[playerid][i][pvPrice] / 2, PlayerVehicleInfo[playerid][i][pvPriceC] / 2);



Respuesta: Solucion de errores. - Zume - 17.09.2014

http://forum.sa-mp.com/showpost.php?...37&postcount=7


Re: Solucion de errores. - Jeree10 - 17.09.2014

errores:
Код:
(20088 -- 20089) : error 022: must be lvalue (non-constant)
LineaS:
Код:
                        GivePlayerCash(playerid, PlayerVehicleInfo[playerid][i][pvPrice] / 2)
							--PlayerCars;