SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Filterscripts > Includes

Reply
 
Thread Tools Display Modes
Old 04/06/2020, 09:51 PM   #11
Nickk888
Big Clucker
 
Nickk888's Avatar
 
Join Date: Oct 2011
Location: Germany
Posts: 60
Reputation: 82
Default Re: NDIALOG-PAGES - Split dialog lists into multiple pages!

Quote:
Originally Posted by ToiletDuck View Post
Code:
include\ndialog-pages.inc(131) : error 035: argument type mismatch (argument 4)
\ndialog-pages.inc(154) : error 035: argument type mismatch (argument 4)

line 131: ShowPlayerDialog(playerid, dialogid, style, caption, info, button1, button2);
I wonder why const variable in parameter make this error.

@EDIT: Working fine tho but then I check my server.log it shows me this.
Code:
[02:30:26] [debug]
[02:30:26] [debug] Parameter count corrections:
[02:30:26] [debug]
[02:30:26] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<5 arguments>`
[02:30:26] [debug]
[02:30:26] [debug] Run time error 4: "Array index out of bounds"
[02:30:26] [debug]  Attempted to read/write array element at negative index -2
[02:30:26] [debug] AMX backtrace:
[02:30:26] [debug] #0 006f791c in OnDialogResponse (playerid=0, dialogid=6182, response=1, listitem=-2, inputtext[]=@4fd59dd0 ">>>") at ./includes/OnDialogResponse.pwn:3233
[02:30:26] [debug] #1 0001789c in public OnDialogResponse (0, 6182, 1, 10, 1339399632) at D:\05_Desktop\EGRP-master\pawno\include\YSI_Coding\y_timers\..\..\YSI_Data\y_foreach\..\..\YSI_Coding\y_hooks\..\y_cgen\y_cgen.inc:127
[02:30:31] [debug]
[02:30:31] [debug] Parameter count corrections:
[02:30:31] [debug]
[02:30:31] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<5 arguments>`
[02:30:31] [debug]
[02:30:31] [debug] Run time error 4: "Array index out of bounds"
[02:30:31] [debug]  Attempted to read/write array element at negative index -2
[02:30:31] [debug] AMX backtrace:
[02:30:31] [debug] #0 006f791c in OnDialogResponse (playerid=0, dialogid=6182, response=1, listitem=-2, inputtext[]=@4fd59dd0 ">>>") at ./includes/OnDialogResponse.pwn:3233
[02:30:31] [debug] #1 0001789c in public OnDialogResponse (0, 6182, 1, 10, 1339399632) at D:\05_Desktop\EGRP-master\pawno\include\YSI_Coding\y_timers\..\..\YSI_Data\y_foreach\..\..\YSI_Coding\y_hooks\..\y_cgen\y_cgen.inc:127
[02:30:36] [debug]
[02:30:36] [debug] Parameter count corrections:
[02:30:36] [debug]
[02:30:36] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<5 arguments>`
[02:30:36] [debug]
[02:30:36] [debug] Run time error 4: "Array index out of bounds"
[02:30:36] [debug]  Attempted to read/write array element at negative index -2
[02:30:36] [debug] AMX backtrace:
[02:30:36] [debug] #0 006f791c in OnDialogResponse (playerid=0, dialogid=6182, response=1, listitem=-2, inputtext[]=@4fd59dd0 ">>>") at ./includes/OnDialogResponse.pwn:3233
[02:30:36] [debug] #1 0001789c in public OnDialogResponse (0, 6182, 1, 10, 1339399632) at D:\05_Desktop\EGRP-master\pawno\include\YSI_Coding\y_timers\..\..\YSI_Data\y_foreach\..\..\YSI_Coding\y_hooks\..\y_cgen\y_cgen.inc:127
[02:30:40] [debug]
[02:30:40] [debug] Parameter count corrections:
[02:30:40] [debug]
[02:30:40] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<5 arguments>`
[02:30:40] [debug]
[02:30:40] [debug] Run time error 4: "Array index out of bounds"
[02:30:40] [debug]  Attempted to read/write array element at negative index -2
[02:30:40] [debug] AMX backtrace:
[02:30:40] [debug] #0 006f791c in OnDialogResponse (playerid=0, dialogid=6182, response=1, listitem=-2, inputtext[]=@4fd59dd0 ">>>") at ./includes/OnDialogResponse.pwn:3233
[02:30:40] [debug] #1 0001789c in public OnDialogResponse (0, 6182, 1, 10, 1339399632) at D:\05_Desktop\EGRP-master\pawno\include\YSI_Coding\y_timers\..\..\YSI_Data\y_foreach\..\..\YSI_Coding\y_hooks\..\y_cgen\y_cgen.inc:127
[02:30:48] [debug]
[02:30:48] [debug] Parameter count corrections:
[02:30:48] [debug]
[02:30:48] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<5 arguments>`
I have probably fixed that error in my code, please consider redownloading the include from the github page!
__________________
Nickk888 is offline   Reply With Quote
Old 05/06/2020, 02:49 AM   #12
ToiletDuck
Huge Clucker
 
ToiletDuck's Avatar
 
Join Date: Apr 2012
Location: Philippines, Lucena City
Posts: 400
Reputation: 43
Default Re: NDIALOG-PAGES - Split dialog lists into multiple pages!

Quote:
Originally Posted by Nickk888 View Post
I have probably fixed that error in my code, please consider redownloading the include from the github page!
> Did you negate the listitem before using the index in your script? Looks like you didn't do that so even though you press the Next and Back button, it will still call OnDialogResponse using -2 as the listitem. I have changed the Value inside the include so give it a try, check if you negate the dialog! Look at the example script i provided.

Hi still I downloaded your latest the error still occurs. Whenever I press Next or Prev.

Code:
[09:18:12] [debug]
[09:18:12] [debug] Parameter count corrections:
[09:18:12] [debug]
[09:18:12] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<5 arguments>`
[09:18:12] [debug]
[09:18:12] [debug] Run time error 4: "Array index out of bounds"
[09:18:12] [debug]  Attempted to read/write array element at index 65535 in array of size 50
[09:18:12] [debug] AMX backtrace:
[09:18:12] [debug] #0 006f791c in OnDialogResponse (playerid=0, dialogid=6182, response=1, listitem=65535, inputtext[]=@1e9ff5d0 ">>>") at ./includes/OnDialogResponse.pwn:3233
[09:18:12] [debug] #1 0001789c in public OnDialogResponse (0, 6182, 1, 10, 513799632) at D:\05_Desktop\EGRP-master\pawno\include\YSI_Coding\y_timers\..\..\YSI_Data\y_foreach\..\..\YSI_Coding\y_hooks\..\y_cgen\y_cgen.inc:127
[09:18:13] [debug]
[09:18:13] [debug] Parameter count corrections:
[09:18:13] [debug]
[09:18:13] [debug] The 1st mangled argments (e.g. `<1073741823 arguments>`) below should read `<5 arguments>`
[09:18:13] [debug]
[09:18:13] [debug] Run time error 4: "Array index out of bounds"
[09:18:13] [debug]  Attempted to read/write array element at index 65535 in array of size 50
[09:18:13] [debug] AMX backtrace:
[09:18:13] [debug] #0 006f791c in OnDialogResponse (playerid=0, dialogid=6182, response=1, listitem=65535, inputtext[]=@1e9ff5d0 "<<<") at ./includes/OnDialogResponse.pwn:3233
[09:18:13] [debug] #1 0001789c in public OnDialogResponse (0, 6182, 1, 8, 513799632) at D:\05_Desktop\EGRP-master\pawno\include\YSI_Coding\y_timers\..\..\YSI_Data\y_foreach\..\..\YSI_Coding\y_hooks\..\y_cgen\y_cgen.inc:127
ToiletDuck is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I list up to X messages and split the messages between "pages" EtayJ Scripting Help 2 31/10/2017 10:13 AM
Report dialog max 17 rows ... how can i make pages? Metharon Scripting Help 6 30/05/2015 11:07 PM
Dynamic Dialog Pages GiamPy. Scripting Help 4 20/06/2013 07:05 AM
Pawno, C++, web pages... AiVAMAN Everything and Nothing 4 18/01/2009 03:25 PM


All times are GMT. The time now is 11:33 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.