Jump to content
Sign in to follow this  
lawlessbaron

Array Error

Recommended Posts

Ok so i have been adding weapons to a weapon array the original array comes from Altis Life RPG

these are two arrays

Civilian Shop

http://pastebin.com/naAgKb3h

Blufor Shop

http://pastebin.com/6vdH5eLN

can anyone assist ?

I have been through it a heap of times and nothing i am also using Notepad ++ with ArmA Script Plugins

Share this post


Link to post
Share on other sites

What exactly is the problem? Is it giving an error or is it simply not working? You can also try posting your questions in the Altis Life thread and/or send your questions to the author via private message.

Share this post


Link to post
Share on other sites


[list=1]
[*][color=#000000]default[/color]
[*][color=#000000]                        {[/color]
[*][color=#000000]                                ["Black Market Weapons",[/color]
[*][color=#000000]                                        [[/color]
[*][color=#000000]                                                ["arifle_SDAR_F",nil,100000],[/color]
[*][color=#000000]                                                ["hgun_Rook40[/color]
[/list]

You are typing an array.

But what do you want with the array?

Normaly you assign it to a variable or something... so maybe like this:


[list=1]
[*][color=#000000]default[/color]
[*][color=#000000]                       {[/color]
[*][color=#00ff00][b]                                     SHOPITEMS =  [/b][/color][color=#000000]["Black Market Weapons",[/color]
[*][color=#000000]                                       [[/color]
[*][color=#000000]                                               ["arifle_SDAR_F",nil,100000],[/color]
[*][color=#000000]                                               ["hgun_Rook40[/color]
[/list]

Share this post


Link to post
Share on other sites

When i scroll wheel on an AI it is suppose to display the array of weapons but nothing appears just the menu nothing more

for example this enableSimulation true; this allowDamage false; this addAction["Black Market Weapons",life_fnc_weaponShopMenu,"black_market",0,false,false,"",'playerSide == civilian'];

Edited by LawlessBaron

Share this post


Link to post
Share on other sites

@HeliJunkie:

Looks like this switch statement itself is returning a value stored in a variable outside of the pasted chunk of code.

@LawlessBaron:

You're missing a few commas. The ones I've noticed are missing in both arrays:

- After "RH_kimber" and before nil

- After "RH_g19" and before nil

- After "RH_vp70" and before nil

Share this post


Link to post
Share on other sites

It could be helpful to launch you game with the -showScriptErrors parameter. Whenever a script errors you will see it on the screen. However, it only lasts a few seconds so to find error reports you can go to AppData\Local\Arma 3. In that folder you will see .rpt files. These files contain all the error reports during a session.

Share this post


Link to post
Share on other sites
@HeliJunkie:

Looks like this switch statement itself is returning a value stored in a variable outside of the pasted chunk of code.

@LawlessBaron:

You're missing a few commas. The ones I've noticed are missing in both arrays:

- After "RH_kimber" and before nil

- After "RH_g19" and before nil

- After "RH_vp70" and before nil

This is out of the vars.sqf

http://pastebin.com/qhx6TYLz

Also i have this screenshot

http://i.imgur.com/4DAsiCg.jpg (283 kB)

It could be helpful to launch you game with the -showScriptErrors parameter. Whenever a script errors you will see it on the screen. However, it only lasts a few seconds so to find error reports you can go to AppData\Local\Arma 3. In that folder you will see .rpt files. These files contain all the error reports during a session.

I already have it on thanks man

Share this post


Link to post
Share on other sites

Looks like the life_fnc_weaponShopCfg function is not returning a value. There could be an error occurring in that file that you cannot see because a second error occurs and blocks the first. Look in the .rpt file for all the errors that occurred. It should give you a better idea of where the problem is in the fn_weaponShowCfg.sqf file is.

Share this post


Link to post
Share on other sites
Looks like the life_fnc_weaponShopCfg function is not returning a value. There could be an error occurring in that file that you cannot see because a second error occurs and blocks the first. Look in the .rpt file for all the errors that occurred. It should give you a better idea of where the problem is in the fn_weaponShowCfg.sqf file is.

.rpt

http://pastebin.com/QAqjYbzL

vars.sqf

http://pastebin.com/3fRV75eJ

Share this post


Link to post
Share on other sites

remove colon after last element in life_garage_prices and life_garage_sell (in vars.sqf)

[color=#000000][font=Consolas]["B_MRAP_01_F",7500][/font][/color][color=#ff0000][font=Consolas],[/font][/color][color=#000000][font=Consolas]
[/font][/color]];

to

[color=#000000][font=Consolas]["B_MRAP_01_F",7500][/font][/color][color=#000000][font=Consolas]
[/font][/color]];

and

[color=#000000][font=Consolas]["B_MRAP_01_F",10000][/font][/color][color=#ff0000][font=Consolas],[/font][/color][color=#000000][font=Consolas]
];[/font][/color]

to

[color=#000000][font=Consolas]["B_MRAP_01_F",10000]
];[/font][/color]

Edited by HeliJunkie

Share this post


Link to post
Share on other sites

[/color]

remove colon after last element in life_garage_prices and life_garage_sell (in vars.sqf)

[color=#000000][font=Consolas]["B_MRAP_01_F",7500][/font][/color][color=#ff0000][font=Consolas],[/font][/color][color=#000000][font=Consolas]
[/font][/color]];

to

[color=#000000][font=Consolas]["B_MRAP_01_F",7500][/font][/color][color=#000000][font=Consolas]
[/font][/color]];

and

[color=#000000][font=Consolas]["B_MRAP_01_F",10000][/font][/color][color=#ff0000][font=Consolas],[/font][/color][color=#000000][font=Consolas]
];[/font][/color]

to

[color=#000000][font=Consolas]["B_MRAP_01_F",10000]
];[/font][/color]

Thankyou i don't know how i didn't see that i had removed some custom vehicles and done it all with replace on Notepad ++ i need to find a proper editor

These error suck http://imgur.com/a/eHogl

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×