Skip to content
TORNLIFE More

[Request] [25m] Simple function request

Started by KingLouisCLXXII [2070312] on in API Development.

1 replies · 241 views · thread synced · 9 days ago · View on torn.com
About this thread

Posts archived: 2 / 2 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
2
Discussion span
→
People posting
1
Likes on archived posts
2
Authority score
50 / 100
Historical score
20 / 100
Story score
25 / 100
Engagement score
43 / 100
KingLouisCLXXII [2070312]
Need the following function for one of my programs. The function is easy to make but tedious so I'd like to pay someone to do it. It must be written in javascript. I've provided the docstring and function header below as well as an example input for `upgrades`. Upgrade costs can be found https://wiki.torn.com/wiki/Company#Upgrades


/**
* Return the startup cost + cost of upgrades for a company of the given with the given upgrades as a percentage of the startup cost
* @param upgrades company->company_detailed->upgrades
* @param company_type the company's type
* @return {number} cost of company
*/
function calcCompCost(upgrades, company_type){

}

"upgrades": {
"company_size": 10,
"staffroom_size": "Large staff room",
"storage_size": "No storage room",
"storage_space": 0,
}