SA-MP Forums

Go Back   SA-MP Forums > SA-MP Scripting and Plugins > Scripting Help

Reply
 
Thread Tools Display Modes
Old 14/01/2020, 12:47 PM   #11
VandZone
Little Clucker
 
Join Date: Jan 2020
Posts: 8
Reputation: 0
Default Re: NEED HELP! I HAVE THIS PROBLEM

Quote:
Originally Posted by Calisthenics View Post
I saw the output and thought you compiled with -d3, now I realized that it was given due to the recursion.

Do you use pawno editor or any other? For pawno editor, you have to create a file named pawn.cfg and write -d3 in it. The file should be located in pawno folder.
Yes, I use Pawno but the same thing still appears when compiling, where are the new reports supposed to appear?


Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase

Header size: 28504 bytes
Code size: 5483316 bytes
Data size: 9893220 bytes
Stack/heap size: 16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements:15421424 bytes
VandZone is offline   Reply With Quote
Old 14/01/2020, 01:12 PM   #12
Calisthenics
Gangsta
 
Join Date: May 2018
Posts: 956
Reputation: 167
Default Re: NEED HELP! I HAVE THIS PROBLEM

It is normal for the extra info to be shown either by compiling with -d2/-d3 or when there is recursion in the code.

If you have created the file correctly and placed it to the pawno folder, it will print the name of the function instead of ??
__________________
Calisthenics is offline   Reply With Quote
Old 14/01/2020, 04:31 PM   #13
VandZone
Little Clucker
 
Join Date: Jan 2020
Posts: 8
Reputation: 0
Default Re: NEED HELP! I HAVE THIS PROBLEM

Quote:
Originally Posted by Calisthenics View Post
It is normal for the extra info to be shown either by compiling with -d2/-d3 or when there is recursion in the code.

If you have created the file correctly and placed it to the pawno folder, it will print the name of the function instead of ??
now this appears

[13:32:16] [debug] Run time error 4: "Array index out of bounds"
[13:32:16] [debug] Accessing element at index 682 past array upper bound 681
[13:32:16] [debug] AMX backtrace:
[13:32:16] [debug] #0 000035a4 in Bar:CreateProgressBar (Float=546.00000, Float:y=419.00000, Float:width=67.50000, Float:height=2.50000, color=-8978177, Float:max=100.00000) at C:\Users\usuario\Desktop\VZ Roleplay v5.10\pawno\include\progress.inc:71
[13:32:16] [debug] #1 000cbbd8 in public cargartodo () at C:\Users\usuario\Desktop\VZ Roleplay v5.10\gamemodes\Vz.pwn:12492

Line 12492:
speedbar[i] = CreateProgressBar(546.00, 419.00, 67.50, 2.50, -8978177, 100.0);


How do I fix it?
VandZone is offline   Reply With Quote
Old 14/01/2020, 04:52 PM   #14
Calisthenics
Gangsta
 
Join Date: May 2018
Posts: 956
Reputation: 167
Default Re: NEED HELP! I HAVE THIS PROBLEM

My guess was right, function `CreateProgressBar` caused it. Open progress.inc file and go to line 71, is it the same as the one I found on the internet?

Code:
	new
		barid;

	for(barid = 0; barid < sizeof Bars; ++barid)
		if(!Bars[barid][pb_created]) break;

	if(Bars[barid][pb_created] || barid == sizeof Bars)
		return INVALID_BAR_ID;
If the limit was reached (no more progress bars available), barid will be 682 same as the size of `Bars` array. In order to fix it, replace the red line with:
pawn Code:
if(barid == sizeof Bars)
Save the changes and re-compile.
__________________
Calisthenics is offline   Reply With Quote
Old 14/01/2020, 05:36 PM   #15
VandZone
Little Clucker
 
Join Date: Jan 2020
Posts: 8
Reputation: 0
Default Re: NEED HELP! I HAVE THIS PROBLEM

Quote:
Originally Posted by Calisthenics View Post
My guess was right, function `CreateProgressBar` caused it. Open progress.inc file and go to line 71, is it the same as the one I found on the internet?

Code:
	new
		barid;

	for(barid = 0; barid < sizeof Bars; ++barid)
		if(!Bars[barid][pb_created]) break;

	if(Bars[barid][pb_created] || barid == sizeof Bars)
		return INVALID_BAR_ID;
If the limit was reached (no more progress bars available), barid will be 682 same as the size of `Bars` array. In order to fix it, replace the red line with:
pawn Code:
if(barid == sizeof Bars)
Save the changes and re-compile.

Thank you brother, now I only have this error that shows the nativechecker, how do I solve it?



[12:30:25] Error: Function not registered: 'Streamer_CallbackHook'
[12:30:25] Error: Function not registered: 'CreateDynamicObject'
[12:30:25] Error: Function not registered: 'SetDynamicObjectMaterial'
[12:30:25] Error: Function not registered: 'DestroyDynamicObject'
[12:30:25] Error: Function not registered: 'UpdateDynamic3DTextLabelText'
[12:30:25] Error: Function not registered: 'DestroyDynamic3DTextLabel'
[12:30:25] Error: Function not registered: 'DestroyDynamicPickup'
[12:30:25] Error: Function not registered: 'SetDynamicObjectMaterialText'
[12:30:25] Error: Function not registered: 'CreateDynamicPickup'
[12:30:25] Error: Function not registered: 'CreateDynamic3DTextLabel'
[12:30:25] Error: Function not registered: 'MoveDynamicObject'
[12:30:25] Error: Function not registered: 'IsValidDynamicObject'
[12:30:25] Error: Function not registered: 'CreateDynamicActor'
[12:30:25] Error: Function not registered: 'CreateDynamicRectangle'
[12:30:25] Error: Function not registered: 'CreateDynamicMapIcon'
[12:30:25] Error: Function not registered: 'AttachDynamicObjectToVehicle'
[12:30:25] Error: Function not registered: 'IsPlayerInDynamicArea'
[12:30:25] Error: Function not registered: 'SetDynamicActorHealth'
[12:30:25] Error: Function not registered: 'DestroyDynamicMapIcon'
[12:30:25] Error: Function not registered: 'DestroyDynamicActor'
[12:30:25] Error: Function not registered: 'GetDynamicObjectPos'
VandZone is offline   Reply With Quote
Old 14/01/2020, 05:40 PM   #16
Calisthenics
Gangsta
 
Join Date: May 2018
Posts: 956
Reputation: 167
Default Re: NEED HELP! I HAVE THIS PROBLEM

Remove nativechecker plugin, the problem was that you loaded nativechecker before streamer plugin so it gave the "errors" but if you load nativechecker plugin last you will see that the "errors" are not given again. You do not need that plugin, crashdetect can also detect run time error 19 (which is what nativechecker plugin is for) and all the rest.
__________________
Calisthenics is offline   Reply With Quote
Old 14/01/2020, 06:09 PM   #17
VandZone
Little Clucker
 
Join Date: Jan 2020
Posts: 8
Reputation: 0
Default Re: NEED HELP! I HAVE THIS PROBLEM

Quote:
Originally Posted by Calisthenics View Post
Remove nativechecker plugin, the problem was that you loaded nativechecker before streamer plugin so it gave the "errors" but if you load nativechecker plugin last you will see that the "errors" are not given again. You do not need that plugin, crashdetect can also detect run time error 19 (which is what nativechecker plugin is for) and all the rest.
ohh thanks, the error no longer appears, very thanks bro you are a GOD.


Just one more thing, how do I close the thread?
VandZone 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



All times are GMT. The time now is 01:51 AM.


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