23.09.2011, 16:51
remove the entire callback. it should work then. why?
the problem you got, is:
the gamemode got loaded first. see it as a stack. type a command, it will process form top-to-down. with the gamemode only, there wont be any problems, but when you load more scripts (0=gamemode, 1=carmenu, 2=cartune 3=animations), then any command/callback will get processed in this order:
the (number) indicates the order they got loaded btw..
so far, all seem to work together. now, lets add your (4) admin script which contains the troblemaking DialogResponse(). ot causes all others to fail:
by removing the whole callback, it will not abort processing "down the stack".
i suggest you to remove the return 1; there, just to prove that it will work with the "non returning" dialogresponse
i did that trick with the /cmds aswell: the gamemode prints out like 20 lines, plus each filterscripts' commands aswell. like my Race script, loaded as last, prints its /cmds as FIRST, then the former loaded scripts, at last the gamemode cmds. ONLY the gamemode /cmds contains the return 1; at its end, all others will print out text, pass the processing to the next script, until it reaches the return (1 most prolly) in the gamemode...
or, to be short:
this looks pretty senseless, BUT it works, and causes no trouble afaik. feel free to add some stuff later there.
the problem you got, is:
Код:
(0) GameMode
Код:
(3) animations (first) (2) cartune (second) (1) carmenu (third) (0) GameMode (last - always)
so far, all seem to work together. now, lets add your (4) admin script which contains the troblemaking DialogResponse(). ot causes all others to fail:
Код:
(4) Admin <<< this has the return 1; in the command/callback (DialogResponse here), so it will return too early. (3) animations (2) cartune (1) carmenu (0) GameMode
i suggest you to remove the return 1; there, just to prove that it will work with the "non returning" dialogresponse
i did that trick with the /cmds aswell: the gamemode prints out like 20 lines, plus each filterscripts' commands aswell. like my Race script, loaded as last, prints its /cmds as FIRST, then the former loaded scripts, at last the gamemode cmds. ONLY the gamemode /cmds contains the return 1; at its end, all others will print out text, pass the processing to the next script, until it reaches the return (1 most prolly) in the gamemode...
or, to be short:
Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) { }