SA-MP Forums Archive
a little help with a dialog - 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: a little help with a dialog (/showthread.php?tid=366347)



a little help with a dialog - San1 - 06.08.2012

Код:
if(dialogid == DIALOG_WEAPONS)
    	{
        	if(!response) // If they clicked 'Cancel'
        	{
        		SendClientMessage(playerid,COLOR_YELLOW,"You Have Canceled The Dialog");
        	}
            if(listitem == 0)
            {
                GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14);
            }
There is more to the code but line 44 is where it shows SendClientMessage

ERROR:C:\Documents and Settings\~Adrian~\Desktop\radiotest.pwn(44) : error 029: invalid expression, assumed zero
C:\Documents and Settings\~Adrian~\Desktop\test.pwn(44) : warning 215: expression has no effect
C:\Documents and Settings\~Adrian~\Desktop\test.pwn(44) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\~Adrian~\Desktop\test.pwn(44) : error 029: invalid expression, assumed zero
C:\Documents and Settings\~Adrian~\Desktop\test.pwn(44) : fatal error 107: too many error messages on one line


Re: a little help with a dialog - Devilxz97 - 06.08.2012

pawn Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
    if(dialogid == DIALOG_WEAPONS)
    {
        if(response == 0)
        {
            SendClientMessage(playerid,COLOR_YELLOW,"You Have Canceled The Dialog");
        }
        else if(listitem == 0)
        {
            GivePlayerWeapon(playerid, WEAPON_DEAGLE, 14);
        }
      /*else if(listitem == 1)
        {
            GivePlayerWeapon(playerid, weaponid/weaponname, ammo);
        }*/

    }
    return 1;
}
try this