Calling DCMD commands from under OnDialogResponse?
#1

Hi all,

I am a bit lost here. I am trying to make a huge teleport dialog which contains all the teleports on my server spread out over several categories. My original plan was to call the commands directly from under the dialog - like so:
pawn Код:
dcmd_example(playerid, params);
As was to be expected, I get an error about lacking params. However, I cannot for the life of me figure out how to define these params as unused. I know that within a command I can simply use...
pawn Код:
#pragma unused params
...but that does not work here.

How do I call a DCMD command directly from within OnDialogResponse?

Thanks in advance.
Reply
#2

Depends. If you don't want to send any params, then just put "" (two double quotes) in there and it'll work. If you DO want to send params, you'll have to format them all in the right order in a string and then send that string to the function.
Reply
#3

Hmm... Just tried that, script compiled fine, but the dialog option does not do anything at all. I think it might be my dialog, so I'm gonna try something here. I'll edit my post with the results.

EDIT: It works! My dialog was broken. Fixed that, applied your method, and it works great. Thanks!
Reply
#4

I normally do
pawn Код:
dcmd_example(playerid, inputtext);
or
pawn Код:
dcmd_example(playerid,"params");
All result in the same because they are arrays.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)