SA-MP Forums Archive
error :V - 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: error :V (/showthread.php?tid=658902)



error :V - ZigGamerx - 15.09.2018

ERROR

Код:
G:\Pawno\filterscripts\clan.pwn(2203) : error 004: function "SetDialogPreviewRotation" is not implemented
G:\Pawno\filterscripts\clan.pwn(2224) : error 004: function "SetDialogPreviewRotation" is not implemented
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2016, ITB CompuPhase


2 Errors.
CODE

IMAGE:
https://imgur.com/a/zlq8DNB

Код:
CMD:cbuyskin(playerid) {
	if (playerClanID[playerid] == -1)
	    return SendClientMessage(playerid, COLOR_TOMATO, "Error: You are not in any clan, therefore can't use this command.");

	if (playerClanRank[playerid] < CLAN_RANK_LEADER) // leader or owner only use this command
	    return SendClientMessage(playerid, COLOR_TOMATO, "Error: You should be clan leader/owner to use this command.");

	const MAX_SKINS = 312;
    static string[MAX_SKINS * 32];

    if (string[0] == EOS) {
        for (new i = 0; i < MAX_SKINS; i++) {
            format(string, sizeof(string), "%s%i\tID: %i~n~~r~~h~~h~Price: $%s\n", string, i, i, FormatNumber(15000000));
        }
    }

	for (new i = 0; i < sizeof(CLAN_WEAPONS); i++) {
		SetDialogPreviewRotation(playerid, i, 0.0, 0.0, 0.0, 1.0);
	}

	return Dialog_Show(playerid, clan_skins, DIALOG_STYLE_PREVIEW_MODEL, "Select clan skin", string, "Select", "Close");
}

CMD:cbuyweapon(playerid) {
	if (playerClanID[playerid] == -1)
	    return SendClientMessage(playerid, COLOR_TOMATO, "Error: You are not in any clan, therefore can't use this command.");

	if (playerClanRank[playerid] < CLAN_RANK_LEADER) // leader or owner only use this command
	    return SendClientMessage(playerid, COLOR_TOMATO, "Error: You should be clan leader/owner to use this command.");

    static string[sizeof(CLAN_WEAPONS) * 64];
    if (string[0] == EOS) {
        for (new i = 0; i < sizeof(CLAN_WEAPONS); i++) {
       		format(string, sizeof string, "%s%i\t%s~n~~r~~h~~h~Price: $%s\n", string, CLAN_WEAPONS[i][CLAN_WEAPON_MODEL], CLAN_WEAPONS[i][CLAN_WEAPON_NAME], FormatNumber(CLAN_WEAPONS[i][CLAN_WEAPON_COST]));
       	}
    }

	for (new i = 0; i < sizeof(CLAN_WEAPONS); i++) {
		SetDialogPreviewRotation(playerid, i, 0.0, 0.0, -50.0, 1.5);
	}

	return Dialog_Show(playerid, clan_weapons, DIALOG_STYLE_PREVIEW_MODEL, "Select weapon for clan vault", string, "Select", "Close");
}



Re: error :V - DeMoo - 15.09.2018

PHP код:
format(stringsizeof string"%s%i(0.0, 0.0, 0.0, 1.5)\t%s~n~~g~~h~$%i\n"stringSKIN_SHOP[i][SKIN_MODELID], SKIN_SHOP[i][SKIN_NAME], SKIN_SHOP[i][SKIN_PRICE]); 
it's my code and it's working


Re: error :V - Burridge - 15.09.2018

The error means that you're using a function you haven't defined in the code. In this case "SetDialogPreviewRotation". That function comes from this include.

Quote:
Originally Posted by DeMoo
Посмотреть сообщение
PHP код:
format(stringsizeof string"%s%i(0.0, 0.0, 0.0, 1.5)\t%s~n~~g~~h~$%i\n"stringSKIN_SHOP[i][SKIN_MODELID], SKIN_SHOP[i][SKIN_NAME], SKIN_SHOP[i][SKIN_PRICE]); 
it's my code and it's working
That isn't even relevant to what was asked.


Re: error :V - Dayrion - 15.09.2018

Did you include the code before using it? I mean, the code should be after the line where the include is... included.


Re: error :V - Kasichok - 15.09.2018

add this somewhere

PHP код:
public SetDialogPreviewRotation(playeridlistitemFloat:rxFloat:ryFloat:rzFloat:zoom)
{
    return 
1;




Re: error :V - ZigGamerx - 16.09.2018

Quote:
Originally Posted by Kasichok
Посмотреть сообщение
add this somewhere

PHP код:
public SetDialogPreviewRotation(playeridlistitemFloat:rxFloat:ryFloat:rzFloat:zoom)
{
    return 
1;

thanks +REP


Re: error :V - Dayrion - 16.09.2018

Quote:
Originally Posted by ZigGamerx
Посмотреть сообщение
thanks +REP
Well.. Will you code works as intended? Compiling is a thing, having a functionnal code is an another thing.


Re: error :V - Burridge - 16.09.2018

It won't work as intended. All that solution does is get rid of the compilation error. There's no functionality there.

As I said in a previous reply the functionality is from: https://sampforum.blast.hk/showthread.php?tid=570213


Re: error :V - SaMuRy - 16.09.2018

You have to include the code before... you did ?


Re: error :V - NoorMustafa123 - 16.09.2018

yep, but not using #include <code> lol

it should be like kachoik's code

PHP код:
public SetDialogPreviewRotation(playeridlistitemFloat:rxFloat:ryFloat:rzFloat:zoom)
{
    return 
1;