How use params into OnDialogResponse
#1

I need use ZCMD To return command

Quote:

D:\Survival Dub\gamemodes\SD.pwn(474) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


1 Error.

Код:
    
if(dialogid == DIALOG_VIP){
    if(response)
    {
    switch(listitem)
    {
    case 0: return cmd_kill(playerid); //test, obviously I'll change this command   (line 474)
    case 1: 
    GivePlayerWeapon(playerid, WEAPON_AK47, 120);
    case 2: GivePlayerWeapon(playerid, WEAPON_SHOTGSPA, 28);
    }
    }
    return 1;
    }
Error
Reply
#2

I don't think you can return commands in a dialog response, change cmd_kill(playerid); to SetPlayerHealth(playerid 0);
Reply
#3

You could try
return return cmd_kill(playerid, "");

You can also take a look at this post
Reply
#4

Quote:
Originally Posted by Swarn
Посмотреть сообщение
I don't think you can return commands in a dialog response, change cmd_kill(playerid); to SetPlayerHealth(playerid 0);
Yes he can.

pawn Код:
cmd_yourcommandname(playerid,"");
@PPC23, no need for return.
Reply


Forum Jump:


Users browsing this thread: 4 Guest(s)