Page 1 of 2
✔JustAnyone In distress
Posted: 03 Aug 2017, 23:20
by JustAnyone
Help please. My brain can't work anymore.
Code: Select all
In /storage/emulated/0/TheoTown/plugins/DSA Headquarters/dsahq.json:
org.json.JSONException: Names must be strings, but {"id":"dsahqup2","price":50000,"monthly price":500,"frames":[{"bmp":"meteor1.png"}],"title":"DSA Headquarters","text":"Upgrade Headquarters to get cool DSA cars. (Not implemented yet!)","influence management":1000} is of type org.json.JSONObject at character 971 of [
{
"id":"dsahq",
"type":"public",
"width":3,
"height":3,
"frames":[{"bmp":"dsahq.png"}],
"title":"DSA Headquarters",
"text":"Headquarters of all DSA operations.",
"influence management":"500",
"needs road":"true",
"water":"-5",
"power":"-5",
"monthly price":"300",
"max count":"1",
"upgrades":[{
"id":"dsahqup1",
"price":50000,
"monthly price":500,
"frames":[{"bmp":"meteor1.png"}],
"title":"DSA Headquarters",
"text":"Upgrade the hardware to spy fellow theotown players.",
"influence management":500,
"requirement":{"requirements":[{"type":"RANK","data":{"id":"$rnk_city_big"}}]},
{
"id":"dsahqup2",
"price":50000,
"monthly price":500,
"frames":[{"bmp":"meteor1.png"}],
"title":"DSA Headquarters",
"text":"Upgrade Headquarters to get cool DSA cars. (Not implemented yet!)",
"influence management":1000}],
"price":"500000"
}
]
Re: What?
Posted: 04 Aug 2017, 15:29
by Barky
Re: What?
Posted: 04 Aug 2017, 17:53
by Lobby
Use
https://jsonlint.com/ to find syntax issues. In this case you forgot a closing bracket }
Re: What?
Posted: 04 Aug 2017, 18:45
by JustAnyone
Re: Some json, what is wrong?
Posted: 07 Aug 2017, 18:56
by JustAnyone
Code: Select all
[
{
"id":"dsahq",
"type":"public",
"width":3,
"height":3,
"frames":[{"bmp":"dsahq.png"}],
"title":"DSA Headquarters",
"text":"Headquarters of all DSA operations.",
"influence management":"500",
"needs road":"true",
"water":"-5",
"power":"-5",
"price":"500000",
"monthly price":"300",
"max count":"1",
"upgrades":[{
"id":"dsahqup1",
"price":50000,
"monthly price":500,
"frames":[{"bmp":"meteor1.png"}],
"title":"DSA Headquarters",
"text":"Upgrade the hardware to spy fellow theotown players.",
"influence management":500,
"requirement":{"requirements":[{"type":"RANK","data":{"id":"$rnk_city_big"}}]},
{
"id":"dsahqup2",
"price":50000,
"monthly price":500,
"frames":[{"bmp":"meteor1.png"}],
"title":"DSA Headquarters",
"text":"Upgrade Headquarters to get cool DSA cars. (Not implemented yet!)",
"influence management":1000,
"requirement":{"requirements":[{"type":"RANK","data":{"id":"$rnk_city_big"}}]}}]}
}
]
Just fix ir for me please. My brain hurts...
Re: Some json, what is wrong?
Posted: 07 Aug 2017, 22:10
by Lobby
Code: Select all
[{
"id": "dsahq",
"type": "public",
"width": 3,
"height": 3,
"frames": [{
"bmp": "dsahq.png"
}],
"title": "DSA Headquarters",
"text": "Headquarters of all DSA operations.",
"influence management": "500",
"needs road": "true",
"water": "-5",
"power": "-5",
"price": "500000",
"monthly price": "300",
"max count": "1",
"upgrades": [{
"id": "dsahqup1",
"price": 50000,
"monthly price": 500,
"frames": [{
"bmp": "meteor1.png"
}],
"title": "DSA Headquarters",
"text": "Upgrade the hardware to spy fellow theotown players.",
"influence management": 500,
"requirement": {
"requirements": [{
"type": "RANK",
"data": {
"id": "$rnk_city_big"
}
}]
}
},
{
"id": "dsahqup2",
"price": 50000,
"monthly price": 500,
"frames": [{
"bmp": "meteor1.png"
}],
"title": "DSA Headquarters",
"text": "Upgrade Headquarters to get cool DSA cars. (Not implemented yet!)",
"influence management": 1000,
"requirement": {
"requirements": [{
"type": "RANK",
"data": {
"id": "$rnk_city_big"
}
}]
}
}
]
}]
jsonlint helps a lot, it even indents your code

Re: Some json, what is wrong?
Posted: 08 Aug 2017, 09:37
by JustAnyone
Lobby wrote: ↑07 Aug 2017, 22:10
Code: Select all
[{
"id": "dsahq",
"type": "public",
"width": 3,
"height": 3,
"frames": [{
"bmp": "dsahq.png"
}],
"title": "DSA Headquarters",
"text": "Headquarters of all DSA operations.",
"influence management": "500",
"needs road": "true",
"water": "-5",
"power": "-5",
"price": "500000",
"monthly price": "300",
"max count": "1",
"upgrades": [{
"id": "dsahqup1",
"price": 50000,
"monthly price": 500,
"frames": [{
"bmp": "meteor1.png"
}],
"title": "DSA Headquarters",
"text": "Upgrade the hardware to spy fellow theotown players.",
"influence management": 500,
"requirement": {
"requirements": [{
"type": "RANK",
"data": {
"id": "$rnk_city_big"
}
}]
}
},
{
"id": "dsahqup2",
"price": 50000,
"monthly price": 500,
"frames": [{
"bmp": "meteor1.png"
}],
"title": "DSA Headquarters",
"text": "Upgrade Headquarters to get cool DSA cars. (Not implemented yet!)",
"influence management": 1000,
"requirement": {
"requirements": [{
"type": "RANK",
"data": {
"id": "$rnk_city_big"
}
}]
}
}
]
}]
jsonlint helps a lot, it even indents your code
Thank you again!
Re: JustAnyone's DSA Headquarters .json problems
Posted: 08 Aug 2017, 15:31
by JustAnyone
Code: Select all
[{
"id":"dsacar",
"type":"car",
"frames":[
{"bmp":"carsample.png","w":12,"h":13,"count":4}
],
"v2":true
},
{
"id": "dsahq",
"type": "public",
"width": 3,
"height": 3,
"frames": [{
"bmp": "dsahq.png"
}],
"title": "DSA Headquarters",
"text": "Headquarters of all DSA operations.",
"influence management": "500",
"needs road": "true",
"water": "-5",
"power": "-5",
"price": "1000000",
"monthly price": "250",
"max count": "1",
"upgrades": [{
"id": "dsahqup1",
"price": 30000,
"monthly price": 500,
"build time": 30,
"frames": [{
"bmp": "meteor1.png"
}],
"title": "DSA Hardware Upgrade",
"text": "Upgrade the hardware to spy fellow theotown players.",
"influence management": 1000,
"requirement": {
"requirements": [{
"type": "RANK",
"data": {
"id": "$rnk_city_big"
}
}]
}
},
{
"id": "dsahqup2",
"price": 50000,
"monthly price": 1000,
"build time": 60,
"frames": [{
"bmp": "meteor1.png"
}],
"title": "DSA Cars Upgrade",
"text": "Upgrade Headquarters to get cool DSA cars. (Not implemented yet!)",
"influence management": 2000,
"requirement": {
"requirements": [{
"type": "RANK",
"data": {
"id": "$rnk_city_big"
}
}]
},
"car spawner":[
{
"cars":["dsacar"],
"radius":10,
"count":5
}
]
}
]
}]
Why cars are being mean and not spawning after I upgrade my building?
Thank you.
Re: JustAnyone's DSA Headquarters .json problems
Posted: 09 Aug 2017, 16:15
by JustAnyone
JustAnyone wrote: ↑08 Aug 2017, 15:31
Code: Select all
[{
"id":"dsacar",
"type":"car",
"frames":[
{"bmp":"carsample.png","w":12,"h":13,"count":4}
],
"v2":true
},
{
"id": "dsahq",
"type": "public",
"width": 3,
"height": 3,
"frames": [{
"bmp": "dsahq.png"
}],
"title": "DSA Headquarters",
"text": "Headquarters of all DSA operations.",
"influence management": "500",
"needs road": "true",
"water": "-5",
"power": "-5",
"price": "1000000",
"monthly price": "250",
"max count": "1",
"upgrades": [{
"id": "dsahqup1",
"price": 30000,
"monthly price": 500,
"build time": 30,
"frames": [{
"bmp": "meteor1.png"
}],
"title": "DSA Hardware Upgrade",
"text": "Upgrade the hardware to spy fellow theotown players.",
"influence management": 1000,
"requirement": {
"requirements": [{
"type": "RANK",
"data": {
"id": "$rnk_city_big"
}
}]
}
},
{
"id": "dsahqup2",
"price": 50000,
"monthly price": 1000,
"build time": 60,
"frames": [{
"bmp": "meteor1.png"
}],
"title": "DSA Cars Upgrade",
"text": "Upgrade Headquarters to get cool DSA cars. (Not implemented yet!)",
"influence management": 2000,
"requirement": {
"requirements": [{
"type": "RANK",
"data": {
"id": "$rnk_city_big"
}
}]
},
"car spawner":[
{
"cars":["dsacar"],
"radius":10,
"count":5
}
]
}
]
}]
Why cars are being mean and not spawning after I upgrade my building?
Thank you.
Lobby could you help me out the 3rd time?
Re: JustAnyone's DSA Headquarters .json problems
Posted: 09 Aug 2017, 16:25
by Lobby
If I got you right you want to provide a car spawner within an upgrade. That's currently not supported.
Re: JustAnyone's DSA Headquarters .json problems
Posted: 09 Aug 2017, 16:26
by JustAnyone
Lobby wrote: ↑09 Aug 2017, 16:25
If I got you right you want to provide a car spawner within an upgrade. That's currently not supported.
Yes, exactly!
Re: JustAnyone's DSA Headquarters .json problems
Posted: 10 Aug 2017, 10:04
by JustAnyone
Could you add a support for that in the near future?
Re: JustAnyone's DSA Headquarters .json problems
Posted: 12 Aug 2017, 20:04
by Lobby
Re: JustAnyone's DSA Headquarters .json problems
Posted: 23 Sep 2017, 15:21
by JustAnyone
Another problem. All Plug-in buildings don't seem to spawn custom cars which they are said to do.
Re: JustAnyone's DSA Headquarters .json problems
Posted: 23 Sep 2017, 15:30
by CommanderABab
Maybe radius 10 doesn't get them out of the building.

Re: JustAnyone's DSA Headquarters .json problems
Posted: 01 Nov 2017, 09:35
by JustAnyone
Lobby wrote: ↑09 Aug 2017, 16:25
If I got you right you want to provide a car spawner within an upgrade. That's currently not supported.
If I would use overide function, would it work?
Re: JustAnyone's DSA Headquarters .json problems
Posted: 01 Nov 2017, 09:48
by CommanderABab
No, currently unsupported means just that.
Re: JustAnyone In distress
Posted: 02 Nov 2017, 13:08
by JustAnyone
Code: Select all
[{
"id": "dsacar",
"type": "car",
"flag user7": true,
"flag military": true,
"frames": [{
"bmp": "agentcar.png",
"w": 16,
"h": 13,
"count": 4
}],
"v2": true
},
{
"id": "dsahq",
"type": "military",
"category": "dsacat",
"ordinal": 0,
"width": 4,
"height": 4,
"frames": [{
"bmp": "dsahq.png"
}],
"car spawner": [{
"cars": ["dsacar"],
"radius": 1000,
"count": 500
}],
"title": "DSA Headquarters",
"text": "Headquarters of all DSA operations.",
"influence management": "500",
"needs road": "true",
"water": "-5",
"power": "-5",
"requirement": {
"requirements": [{
"type": "BUILDING",
"data": {
"id": "$mltry_hq00"
}
}]
},
"price": "5000000",
"monthly price": "250",
"random fun": [{
"condition": {
"type": "and",
"inner": [{
"type": "building count",
"id": "dsahq",
"min": 0,
"max": 0
},
{
"type": "date",
"z": 20,
"frame": 30
}
]
},
"actions": [{
"type": "notify",
"id": "$notify_test00",
"z": 1
}]
}],
"max count": "1",
"upgrades": [{
"id": "dsahqup1",
"price": 100000,
"monthly price": 500,
"build time": 30,
"frames": [{
"bmp": "dsahq.png"
}],
"title": "DSA Hardware Upgrade",
"text": "Upgrade the hardware to spy fellow theotown players.",
"influence management": 1000,
"requirement": {
"requirements": [{
"type": "BUILDING",
"data": {
"id": "JAROCKET"
}
}]
}
},
{
"id": "dsahqup2",
"price": 500000,
"monthly price": 1000,
"build time": 60,
"frames": [{
"bmp": "dsahq.png"
}],
"title": "DSA Database Upgrade",
"text": "Upgrade database to cover the whole region!",
"influence management": 2000,
"requirement": {
"requirements": [{
"type": "RANK",
"data": {
"id": "$rnk_city_big"
}
}]
}
}
]
}
]
Any thoughts on why my cars aren't spawning?
Re: JustAnyone In distress
Posted: 19 Jan 2018, 00:56
by Lobby
Is it still an issue?
Re: JustAnyone In distress
Posted: 19 Jan 2018, 01:34
by CommanderABab
Could you show a screenshot of the building and the roads it is placed on?