SA-MP Forums Archive
function "cmd_vipskin" should return a value - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: function "cmd_vipskin" should return a value (/showthread.php?tid=518045)



function "cmd_vipskin" should return a value - ChuckyBabe - 08.06.2014

Код:
Warning: function "cmd_vipskin" should return a value
Код:
CMD:vipskin(playerid, params[])
{
	if(PlayerInfo[playerid][pDonator] >= 1)
	{
		if(IsPlayerInRangeOfPoint(playerid,3.5,-2648.1909, 1397.2834, 906.4609))
		{
             ShowPlayerDialogEx( playerid, DIALOG_3496, DIALOG_STYLE_INPUT, "Skin Selection","Please enter a Skin ID!\n\nNote: Skin changes are free here.", "Wear", "Cancel" );
        }
	else
	{
		SendClientMessage(playerid, COLOR_WHITE, "   You're not near at the VIP Skin list!!");
	}
	return 1;
	}
}
How to fix it ?


Re: function "cmd_vipskin" should return a value - Jack_Leslie - 08.06.2014

pawn Код:
CMD:vipskin(playerid, params[])
{
    if(PlayerInfo[playerid][pDonator] >= 1)
    {
        if(IsPlayerInRangeOfPoint(playerid,3.5,-2648.1909, 1397.2834, 906.4609))
        {
             ShowPlayerDialogEx( playerid, DIALOG_3496, DIALOG_STYLE_INPUT, "Skin Selection","Please enter a Skin ID!\n\nNote: Skin changes are free here.", "Wear", "Cancel" );
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "   You're not near at the VIP Skin list!!");
    }
    return 1;
}



Re: function "cmd_vipskin" should return a value - Zex Tan - 08.06.2014

pawn Код:
CMD:vipskin(playerid, params[])
{
    if(PlayerInfo[playerid][pDonator] >= 1)
    {
        if(IsPlayerInRangeOfPoint(playerid,3.5,-2648.1909, 1397.2834, 906.4609))
        {
             ShowPlayerDialogEx( playerid, DIALOG_3496, DIALOG_STYLE_INPUT, "Skin Selection","Please enter a Skin ID!\n\nNote: Skin changes are free here.", "Wear", "Cancel" );
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "   You're not near at the VIP Skin list!!");
    }
    return 1;
}
You added a bracket after return 1; which causes it.


Re: function "cmd_vipskin" should return a value - ChuckyBabe - 08.06.2014

1 more

pawn Код:
C:\Users\Windows7\Desktop\Microsoft Corporation (c)\Stunt Evolution\gamemodes\SEv2.pwn(13) : fatal error 100: cannot read from file: "fixes2.inc"

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


1 Error.
I already added fixes2.inc at pawno > includes and also in includes help !


Re: function "cmd_vipskin" should return a value - Zex Tan - 08.06.2014

Don't directly click the script, you should always locate your directory of which compiler you're using. If you've already included fixes2, then click pawno > open your script > compile


Re: function "cmd_vipskin" should return a value - SAMProductions - 08.06.2014

Wait,
Quote:
Originally Posted by Jack_Leslie
Посмотреть сообщение
pawn Код:
CMD:vipskin(playerid, params[])
{
    if(PlayerInfo[playerid][pDonator] >= 1)
    {
        if(IsPlayerInRangeOfPoint(playerid,3.5,-2648.1909, 1397.2834, 906.4609))
        {
             ShowPlayerDialogEx( playerid, DIALOG_3496, DIALOG_STYLE_INPUT, "Skin Selection","Please enter a Skin ID!\n\nNote: Skin changes are free here.", "Wear", "Cancel" );
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "   You're not near at the VIP Skin list!!");
    }
    return 1;
}
Quote:
Originally Posted by Zex Tan
Посмотреть сообщение
pawn Код:
CMD:vipskin(playerid, params[])
{
    if(PlayerInfo[playerid][pDonator] >= 1)
    {
        if(IsPlayerInRangeOfPoint(playerid,3.5,-2648.1909, 1397.2834, 906.4609))
        {
             ShowPlayerDialogEx( playerid, DIALOG_3496, DIALOG_STYLE_INPUT, "Skin Selection","Please enter a Skin ID!\n\nNote: Skin changes are free here.", "Wear", "Cancel" );
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "   You're not near at the VIP Skin list!!");
    }
    return 1;
}
You added a bracket after return 1; which causes it.
I think if he's not Donator / VIP it will send this kind of message instead of if he's not in the right range of point.
Код:
You're not near at the VIP Skin list!!
Well, i think it's this :-
pawn Код:
CMD:vipskin(playerid, params[])
{
    if(PlayerInfo[playerid][pDonator] >= 1)
    {
        if(IsPlayerInRangeOfPoint(playerid,3.5,-2648.1909, 1397.2834, 906.4609))
        {
             ShowPlayerDialogEx( playerid, DIALOG_3496, DIALOG_STYLE_INPUT, "Skin Selection","Please enter a Skin ID!\n\nNote: Skin changes are free here.", "Wear", "Cancel" );
        }
        else
        {
             SendClientMessage(playerid, COLOR_WHITE, "   You're not near at the VIP Skin list!!");
        }
    }
    return 1;
}
Just saying, ok?

For fixes2 [Plugin or Include], Here you go :-
fixes2 - Updated 13/01/13.


Re: function "cmd_vipskin" should return a value - Raza2013 - 08.06.2014

pawn Код:
CMD:vipskin(playerid, params[])
{
    if(PlayerInfo[playerid][pDonator] >= 1)
    {
        if(IsPlayerInRangeOfPoint(playerid,3.5,-2648.1909, 1397.2834, 906.4609))
        {
             ShowPlayerDialogEx( playerid, DIALOG_3496, DIALOG_STYLE_INPUT, "Skin Selection","Please enter a Skin ID!\n\nNote: Skin changes are free here.", "Wear", "Cancel" );
        }
    }
    else
    {
        SendClientMessage(playerid, COLOR_WHITE, "   You're not near at the VIP Skin list!!");
    }
    return 1;// -----------------------
}