PDA

View Full Version : [Help] Error Yom_Buttons


juandiegox
21/04/2014, 09:49 PM
Hi friends of forum samp, well, i have a problem, I was doing doors panel, giving enter a panel grille opening, the include I use is yom_buttons, and filterscript which is "123" from zenon city, the problem was that the public OnPlayerPressButton does a function , I say that a function does? , Well what happens is that nothing happens to enter anything, not, as I see it is that the public wrong, please someone help me, greetings and thanks for reading!
my public is:
public OnPlayerPressButton(playerid, buttonid)
{
if(buttonid == BotonGarageSAPD)
{
SendClientMessage(playerid,-1,"Testing");
}
return 1;
}
return 1;
}

my script of the botongaragesapd is this:

in news..
new BotonGarageSAPD;

In ongamemodeinit..
BotonGarageSAPD = CreateButton(1582.1511,-1636.8749,14.0432, 90.0);

and the public..
public OnPlayerPressButton(playerid, buttonid)
{
if(buttonid == BotonGarageSAPD)
{
SendClientMessage(playerid,-1,"Probando");
}
return 1;
}
return 1;
}

Help please! :(
Thanks for reading.

juandiegox
22/04/2014, 12:25 AM
help please.. relive topic

juandiegox
22/04/2014, 09:29 PM
Relive topic, help please ! :C

NoahF
22/04/2014, 10:55 PM
Try this:

public OnPlayerPressButton(playerid, buttonid)
{
if(buttonid == BotonGarageSAPD)
{
SendClientMessage(playerid,-1,"Probando");
}
return 1;
}
Let me know if this fixed it.

itsCody
22/04/2014, 11:00 PM
public OnPlayerPressButton(playerid, buttonid)
{
if(buttonid == BotonGarageSAPD)
{
SendClientMessage(playerid,-1,"Testing");
}
return 1;
}


Try that O_O

NoahF
22/04/2014, 11:03 PM
public OnPlayerPressButton(playerid, buttonid)
{
if(buttonid == BotonGarageSAPD)
{
SendClientMessage(playerid,-1,"Testing");
}
return 1;
}


Try that O_O
Ya, my bad forgot to indent lol. Thanks for that.

juandiegox
22/04/2014, 11:21 PM
Ya, my bad forgot to indent lol. Thanks for that.

The public is not close, see this..
C:\Users\JuandxD\Desktop\Melasua roleplay\gamemodes\MLSA.pwn(458) : error 017: undefined symbol "ProxDetectorS"
C:\Users\JuandxD\Desktop\Melasua roleplay\gamemodes\MLSA.pwn(539) : error 017: undefined symbol "SetPosEx"
C:\Users\JuandxD\Desktop\Melasua roleplay\gamemodes\MLSA.pwn(538) : warning 204: symbol is assigned a value that is never used: "vw"
C:\Users\JuandxD\Desktop\Melasua roleplay\gamemodes\MLSA.pwn(537) : warning 204: symbol is assigned a value that is never used: "interior"
C:\Users\JuandxD\Desktop\Melasua roleplay\gamemodes\MLSA.pwn(556) : error 017: undefined symbol "SetPosEx"
C:\Users\JuandxD\Desktop\Melasua roleplay\gamemodes\MLSA.pwn(555) : warning 204: symbol is assigned a value that is never used: "vw"
C:\Users\JuandxD\Desktop\Melasua roleplay\gamemodes\MLSA.pwn(554) : warning 204: symbol is assigned a value that is never used: "interior"
C:\Users\JuandxD\Desktop\Melasua roleplay\gamemodes\MLSA.pwn(1783) : error 017: undefined symbol "IsABike"
C:\Users\JuandxD\Desktop\Melasua roleplay\gamemodes\MLSA.pwn(1799) : error 017: undefined symbol "IsABike"
C:\Users\JuandxD\Desktop\Melasua roleplay\gamemodes\MLSA.pwn(1844) : error 017: undefined symbol "LoadObjects"
C:\Users\JuandxD\Desktop\Melasua roleplay\gamemodes\MLSA.pwn(1237) : warning 204: symbol is assigned a value that is never used: "SAPDGARAGE"
Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.

itsCody
22/04/2014, 11:24 PM
What do you mean it isn't closed??


public OnPlayerPressButton(playerid, buttonid)
{
if(buttonid == BotonGarageSAPD)
{
SendClientMessage(playerid,-1,"Testing");
}
return 1;
}


You're probably missing another closing bracket else where.

juandiegox
22/04/2014, 11:28 PM
What do you mean it isn't closed??


public OnPlayerPressButton(playerid, buttonid)
{
if(buttonid == BotonGarageSAPD)
{
SendClientMessage(playerid,-1,"Testing");
}
return 1;
}


You're probably missing another closing bracket else where.

Is that public, i put this:
public OnPlayerPressButton(playerid, buttonid)
{
if(buttonid == BotonGarageSAPD)
{
SendClientMessage(playerid,-1,"Probando");
}
return 1;
}
return false;
}


I put a if and pulls no errors, the problem is it anyway does not execute the function of sending message, fuck this script is very rare, I do not understand it does not work me

itsCody
22/04/2014, 11:32 PM
I don't understand the

}
return false;
}


It isn't needed?

You might be missing a closing bracket on something else, it isn't hard to figure out just check each callback

juandiegox
22/04/2014, 11:58 PM
What do you mean it isn't closed??


public OnPlayerPressButton(playerid, buttonid)
{
if(buttonid == BotonGarageSAPD)
{
SendClientMessage(playerid,-1,"Testing");
}
return 1;
}


You're probably missing another closing bracket else where.

FUCK, YOU FUCKING LOVE YOU'RE THE BEST YOU ARE A FUCKING GENIOOOOO THANK THOSE INSULTS ARE LOVING, YOU ARE THE BEST MAN, THANK YOU HAD REASON MY PROBLEM WAS THAT THERE WAS GOOD ENDING PUBLIC OnPlayerDeath sorry the capital letters, I'm excited, many thanks I seriously seriously thank you very much you're the best!

this was what I had to close
public OnVehicleDeath(vehicleid)
{
arr_Engine{vehicleid} = 0;
return 1;
}
return 1;
}