ZCMD in dialog click able command. -
Scrillex - 22.03.2013
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");
}
}
Re: ZCMD in dialog click able command. -
InfiniTy. - 22.03.2013
Use
pawn Код:
cmd_removeattachedobject(playerid,aoe_str);
Re: ZCMD in dialog click able command. -
Scrillex - 22.03.2013
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
Re: ZCMD in dialog click able command. -
InfiniTy. - 22.03.2013
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
Re: ZCMD in dialog click able command. -
Scrillex - 22.03.2013
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;
}
Re: ZCMD in dialog click able command. -
InfiniTy. - 22.03.2013
This
pawn Код:
CMD:removeattachedobjects(playerid, params[]) return cmd_raos(playerid, params);
Should be
pawn Код:
CMD:raos(playerid,params[]) return cmd_removeattachedobjects(playerid,params);
Re: ZCMD in dialog click able command. -
Scrillex - 22.03.2013
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[]);
}
Re: ZCMD in dialog click able command. -
InfiniTy. - 22.03.2013
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.
Re: ZCMD in dialog click able command. -
Scrillex - 22.03.2013
Ohh okay All worked grate thanks