You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but it should also consider any other dialog styles (DIALOG_STYLE_MSGBOX, DIALOG_STYLE_INPUT and DIALOG_STYLE_PASSWORD) where listitem always -1 only, and any other values are inacceptable.
The ideal way of validating listitems would be remembering how much items the shown dialog actually has for a player (counting it when ShowPlayerDialog was called, as an example) and clearly check if the listitem is in the range of 0..[max listitem value] for dialogs with any tablist style; Otherwise check if the listitem is not -1 for any other dialog styles.
The text was updated successfully, but these errors were encountered:
Now listitems in dialogs are validated this way:
open.mp/Server/Components/Dialogs/dialog.cpp
Lines 158 to 162 in 62a2fa9
but it should also consider any other dialog styles (
DIALOG_STYLE_MSGBOX
,DIALOG_STYLE_INPUT
andDIALOG_STYLE_PASSWORD
) where listitem always -1 only, and any other values are inacceptable.The ideal way of validating listitems would be remembering how much items the shown dialog actually has for a player (counting it when ShowPlayerDialog was called, as an example) and clearly check if the listitem is in the range of 0..[max listitem value] for dialogs with any tablist style; Otherwise check if the listitem is not -1 for any other dialog styles.
The text was updated successfully, but these errors were encountered: