ZCMD in dialog click able command.
#1

The question is how could it be done?
And is it even possible to do like that?
And here is the errors:
error 029: invalid expression, assumed zero
error 035: argument type mismatch (argument 2)
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line

Error line:

CMD:removeattachedobject(playerid, aoe_str);

So here is my code :

pawn Код:
case AOED_REMOVE_SLOT:
        {
            if(response) {
                format(aoe_str, sizeof(aoe_str), "%i", listitem);
                CMD:removeattachedobject(playerid, aoe_str);
            }
            else {
                SendClientMessage(playerid, COLOR_MAGENTA, "* Usage: /removeattachedobject <AttachedObjectSlot>");
                SendClientMessage(playerid, COLOR_WHITE, "** Allows you to remove your attached object from specified attached object slot/index number");
            }
        }
Reply
#2

Use
pawn Код:
cmd_removeattachedobject(playerid,aoe_str);
Reply
#3

pawn Код:
error 017: undefined symbol "CMD_removeattachedobject"
error 029: invalid expression, assumed zero
error 035: argument type mismatch (argument 2)
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Reply
#4

Quote:
Originally Posted by Scrillex
Посмотреть сообщение
pawn Код:
error 017: undefined symbol "CMD_removeattachedobject"
error 029: invalid expression, assumed zero
error 035: argument type mismatch (argument 2)
error 029: invalid expression, assumed zero
fatal error 107: too many error messages on one line
Well do you have that command created? Also if you used CMD_yourcommand then change it to cmd_yourcommand
Reply
#5

Yeah it is created.. I looked in my code there was some miss understanding with

Code:

error 021: symbol already defined: "cmd_removeattachedobjects"
pawn Код:
CMD:removeattachedobjects(playerid, params[]) return cmd_raos(playerid, params);
CMD:removeattachedobjects(playerid, params[])
{
    if(GetPVarInt(playerid, "EditingAttachedObject") != 0 || GetPlayerState(playerid) == PLAYER_STATE_WASTED || GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
        return SendClientMessage(playerid, COLOR_YELLOW, "* Sorry, you can't use this command right now!"), 1;
    else if(!GetPlayerAttachedObjectsCount(playerid)) {
        SendClientMessage(playerid, COLOR_YELLOW, "* Sorry, you don't have any attached object!");
        GameTextForPlayer(playerid, "~r~~h~You have no attached object!", 5000, 3);
        return 1;
    }
    else AOE_ShowPlayerDialog(playerid, 12, AOED_REMOVEALL, "Remove All Attached Object(s)", "Yes", "Cancel");
    return 1;
}
Reply
#6

This
pawn Код:
CMD:removeattachedobjects(playerid, params[]) return cmd_raos(playerid, params);
Should be
pawn Код:
CMD:raos(playerid,params[]) return cmd_removeattachedobjects(playerid,params);
Reply
#7

Big thanks mate yeah I failed hard..
Big thanks
Umm what is the best way to use it like CMD:raos(playerid,params[]) return cmd_removeattachedobjects(playerid,params[]);

Or
CMD:raos(playerid,params[])
{
return cmd_removeattachedobjects(playerid,params[]);
}
Reply
#8

Quote:
Originally Posted by Scrillex
Посмотреть сообщение
Umm what is the best way to use it like CMD:raos(playerid,params[]) return cmd_removeattachedobjects(playerid,params[]);

Or
CMD:raos(playerid,params[])
{
return cmd_removeattachedobjects(playerid,params[]);
}
Doesn't matter..same thing. also the returned command (cmd_removeattachedobjects) shouldn't have [] after params.. i edited my last post.
Reply
#9

Ohh okay All worked grate thanks
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)