Raised This Month: $51 Target: $400
 12% 

[help] Error


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
popilas
Senior Member
Join Date: Apr 2017
Location: lituanica
Old 12-13-2019 , 08:58   [help] Error
Reply With Quote #1

Hello, got some problems

PHP Code:
[AMXXDisplaying debug trace (plugin "supply_box.amxx"version "2.0")
[
AMXXRun time error 10native error (native "ArrayGetArray")
[
AMXX]    [0supply_box.sma::supply_box_pickup (line 389
Line 389

PHP Code:
    ArrayGetArray(SupplyBoxesContentsrandomDropData); 

Then take box got this error

the box remains on the ground i cant take it and go this error.
popilas is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-13-2019 , 09:13   Re: [help] Error
Reply With Quote #2

Show the code for all relevant variables.
__________________
OciXCrom is offline
Send a message via Skype™ to OciXCrom
popilas
Senior Member
Join Date: Apr 2017
Location: lituanica
Old 12-13-2019 , 09:16   Re: [help] Error
Reply With Quote #3

Quote:
Originally Posted by OciXCrom View Post
Show the code for all relevant variables.
PHP Code:
new Array:SupplyBoxes, Array:EmptyCfgLines// <- Information holders //

enum _:SupplyBoxesArray 
{   // <- Array variables //
    
line_id,
    
Float:box_origin[3],
    
Float:box_angles[3]
}

new Array:
SupplyBoxesContents// <- Content holder //

enum _:SupplyContentsArray 
{
    
box_id,
    
box_name[35],
    
pickupForwardItem 
popilas is offline
redivcram
Veteran Member
Join Date: Jul 2014
Location: Serbia
Old 12-13-2019 , 09:41   Re: [help] Error
Reply With Quote #4

And what did you do with them?
redivcram is offline
popilas
Senior Member
Join Date: Apr 2017
Location: lituanica
Old 12-13-2019 , 09:53   Re: [help] Error
Reply With Quote #5

Quote:
Originally Posted by redivcram View Post
And what did you do with them?
just wanna fix error I can take it
Now i cant take it.
popilas is offline
DjSoftero
Veteran Member
Join Date: Nov 2014
Location: Lithuania
Old 12-13-2019 , 13:50   Re: [help] Error
Reply With Quote #6

not enough code. Show how the "randomDrop" and "data" works
__________________
retired chump

Last edited by DjSoftero; 12-13-2019 at 13:51.
DjSoftero is offline
popilas
Senior Member
Join Date: Apr 2017
Location: lituanica
Old 12-13-2019 , 15:24   Re: [help] Error
Reply With Quote #7

Quote:
Originally Posted by DjSoftero View Post
not enough code. Show how the "randomDrop" and "data" works
public supply_box_pickup(box, player)
{
if(!is_user_alive(player) || !can_pickup[player])
return;

new randomDrop = random(ArraySize(SupplyBoxesContents));
new Data[SupplyContentsArray];

ArrayGetArray(SupplyBoxesContents, randomDrop, Data);
ExecuteForward(Data[pickupForwardItem], forwardResult, player);

if(get_pcvar_num(cvar_pickupTimes) > 0)



new Data[SupplyContentsArray];
Data[box_id] = ArraySize(SupplyBoxesContents);
Data[box_name] = BoxName;
Data[pickupForwardItem] = CreateOneForward(plugin_id, "sb_pickup_event", FP_CELL);


I can pm all code
popilas is offline
Natsheh
Veteran Member
Join Date: Sep 2012
Old 12-14-2019 , 05:12   Re: [help] Error
Reply With Quote #8

Show the full error log.

Error possiblity either the array is invalid (SupplyBoxesContents) or the it's the item (randomDrop) or could be both.
__________________
@Jailbreak Main Mod v2.7.0 100%
@User Tag Prefix 100% done !
@Mystery Box 100% done !
@VIP System 100% done !


Last edited by Natsheh; 12-14-2019 at 05:15.
Natsheh is offline
Send a message via MSN to Natsheh Send a message via Skype™ to Natsheh
popilas
Senior Member
Join Date: Apr 2017
Location: lituanica
Old 12-14-2019 , 07:19   Re: [help] Error
Reply With Quote #9

Quote:
Originally Posted by Natsheh View Post
Show the full error log.

Error possiblity either the array is invalid (SupplyBoxesContents) or the it's the item (randomDrop) or could be both.
its full error code
[AMXX] Displaying debug trace (plugin "supply_box.amxx", version "2.0")
[AMXX] Run time error 10: native error (native "ArrayGetArray")
[AMXX] [0] supply_box.sma::supply_box_pickup (line 389)
popilas is offline
OciXCrom
Veteran Member
Join Date: Oct 2013
Location: Macedonia
Old 12-14-2019 , 07:36   Re: [help] Error
Reply With Quote #10

Did you create the array with ArrayCreate() before using ArrayGetArray() on it? Show the creation code.
Do the array contents that are stored inside match with the ones you're retrieving from it?
__________________

Last edited by OciXCrom; 12-14-2019 at 07:38.
OciXCrom is offline
Send a message via Skype™ to OciXCrom
Reply



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

Forum Jump


All times are GMT -4. The time now is 01:27.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode