[problema] Errores en el sistema.
#1

Hola gente, tengo este problema con el sistema que estoy creando, el problema es que tengo la 'function' y todo lo demбs (variables y todo en su lugar) para que el sistema funcione correctamente, pero tengo este error:

Error:
Код:
C:\Users\RZoone\Desktop\ZS-RP\gamemodes\ZSRP.pwn(9273) : error 012: invalid function call, not a valid address
La 'function' Es:

Код:
function RadioBroadCast(playerid, color, string[])
{
	new MiscString[128], Float: aaaPositions[3];
	foreach(Player, i)
	{
		if(PI[i][FrecR] == PI[playerid][FrecR] && PI[i][FrecR] >= 1)
		{
			GetPlayerPos(i, aaaPositions[0], aaaPositions[1], aaaPositions[2]);
			format(MiscString, sizeof(MiscString), "** Radio (%d khz) ** %s: %s", PI[playerid][RadioFrec], GetPlayerNameEx(playerid), string);
			SendClientMessageEx(i, PUBLICRADIO_COLOR, MiscString);
			format(MiscString, sizeof(MiscString), "(radio) %s", string);
			SetPlayerChatBubble(playerid,MiscString,COLOR_WHITE,15.0,5000);
		}
	}
}
Esta es la linea del error:
pawn Код:
RadioBroadCast(playerid, COLOR_GREY, params);
El comando completo ↓↓↓↓↓↓

pawn Код:
command(pr, playerid, params[]){
        if(PI[playerid][Radiot] == 1){
            if(PI[playerid][FrecR] >= 1 || PI[playerid][FrecR] <= -1){
                if(isnull(params)) return SendClientMessage(playerid, COLOR_WHITE, "USA: /pr [chat]");
                RadioBroadCast(playerid, COLOR_GREY, params);
            }
            else SendClientMessage(playerid, COLOR_GRAD2, "* Primero ajusta la frecuencia. /frecuencia'");
        }
        else SendClientMessage(playerid, COLOR_GRAD2, "* Primero necesitas tener una radio portatil, comprala en el 24/7");
        return 1;
    }
Reply
#2

A ver como definiste function
Reply
#3

No deberias declararlo como stock RadioBroadCast(playerid, color, string[]) en vez de con function?
Y para quй pedis el parametro "color" si no lo utilizas?
Reply
#4

Quote:
Originally Posted by MrKaiser
Посмотреть сообщение
No deberias declararlo como stock RadioBroadCast(playerid, color, string[]) en vez de con function?
Y para quй pedis el parametro "color" si no lo utilizas?

es por que lo debe de tener con un macro, y el problema es el que diste, es por que no esta usando ese parametro dentro de la funcion.
Reply
#5

Claro, lo tenнa con un Macro, por eso no me funcionaba, ahora lo tengo arreglado, muchнsimas gracias.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)