Found this post at Armaholic:
Well I've been trying out some of Spooner's nifty little scripts. I got curious with SPON Money and tired it out. I've got a anchorman2 as a arms dealer and a king as the bank. I can't understand some of his directions though. I am just dipping into this huge world of scripting and editing .
I came to a halt when I read this
For each shopkeeper,
[_shop] call SPON_setShop;
By default, this shop will only buy second-hand goods at 50% of standard price.
0. Man, or other object, that the shop is attached to [Object]
1. Buying second-hand goods mark-down [Number 0..N, defaults to 0.5]
2. Selling new goods mark-up [Number 0..N, defaults to 1.0]
3. Stock-items for sale (defaults to [[], [], []], which means the shop will not sell anything):
0. Weapons for sale [Array of String]
1. Magazines for sale [Array of String]
2. Vehicles for sale [Array of String]
I don't get what's in bold, and I can't use an examples to learn from. Also he tells you to copy and paste this into init command in the editor:
[_shop] call SPON_setShop;
For the shopkeeper, and this:
[this] call SPON_setBank;
For the banker. Seems simple enough. When I ran the mission though I couldn't use either the shop or the bank. I also got an error about my prices.sqf about an invalid number.
=/
I admit that the documentation for setting up your own shops and banks leaves something to be desired and does assume you can fathom some things out yourself and/or aspects of the demo mission to suit yourself. Oh, and the documentation is actually wrong, which doesn't help (mainly because I changed how things worked and didn't
actually make functions for setting shops and banks since the wouldn't be available at init time). Very sorry!
Setting up a shop:
[this] execVM "SPON\Money\setShop.sqf";
or
[shopkeeper] execVM "SPON\Money\setShop.sqf";
As I state, this would just create a shop that doesn't sell anything and buys things from players at 50% of the full price. What my documentation was supposed to say is:
You must pass an array of parameters to the setShop.sqf which should be arranged in this way (the numbers refer to indexes within arrays):
0. Man, or other object, that the shop is attached to [Object]
1. Buying second-hand goods mark-down [Number 0..N, defaults to 0.5]
2. Selling new goods mark-up [Number 0..N, defaults to 1.0]
3. Stock-items for sale contains three arrays (Array: defaults to [[], [], []], which means the shop will not sell anything):
0. Weapon classes for sale [Array of String]
1. Magazine classes for sale [Array of String]
2. Vehicle classes for sale [Array of String]
e.g.
Although you can create a shopkeeper from the init line, it is best to create his stock list in init.sqf
_stock =
[
// Weapons.
["M16A2", "Binocular", "LaserDesignator", "NVGoggles", "M136"],
// Magazines.
["PipeBomb", "SmokeShell", "30Rnd_556x45_Stanag", "M136"],
// Vehicles.
["HMMWV50", "HMMWV"]
];
// Shopkeeper sells items in _stock at 110% of normal price and buys anything 30% of normal price.
[shopKeeper, 0.3, 1.1, _stock] execVM "SPON\Money\setShop.sqf";
Setting up a banker:
[this] execVM "SPON\Bank\setBank.sqf";
or
[banker] execVM "SPON\Money\setShop.sqf";
Well, the formatting of prices.sqf is required to be very specific since it is a big nested array in a file (so is parsed just like a script). Look at my example file, but here is a simple example that just defines a couple of item types. It is an array containing 3 arrays, each of which contain arrays of [CLASS, PRICE] for each item of that type which can be bought/sold:
[
[ // Weapons.
["M9", 200],
["M9SD", 700]
],
[ // Ammo
["15Rnd_9x19_M9", 50],
["15Rnd_9x19_M9SD", 200]
],
[ // Vehicles
["HMMWV50", 100000],
["HMMWV", 50000]
]
]
Beyond that, I can't give much more help without seeing your broken prices.sqf file.
I will improve the documentation significantly in the next release, though I can't promise that will be very soon.