Fractal Softworks Forum

Please login or register.

Login with username, password and session length

Author Topic: JSON object ["mission"] not found  (Read 9383 times)

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
JSON object ["mission"] not found
« on: August 19, 2011, 09:35:18 PM »

4889 [Thread-6] ERROR com.fs.starfarer.for.E  - org.json.JSONException: JSONObject["mission"] not found.
org.json.JSONException: JSONObject["mission"] not found.

What exactly does that error mean?

Dibuk

  • Lieutenant
  • **
  • Posts: 71
    • View Profile
Re: JSON object ["mission"] not found
« Reply #1 on: August 20, 2011, 02:43:06 AM »

Got mods on? If you deactivate it dose it start as it should? - Because I got that problem too :(
Logged

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Re: JSON object ["mission"] not found
« Reply #2 on: August 20, 2011, 07:08:36 AM »

This is with my mods  I'm trying to fix them, I think all old missions do this.

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile
Re: JSON object ["mission"] not found
« Reply #3 on: August 20, 2011, 08:21:18 AM »

Do you have a mission_list.csv in the mod? If so, can you post it?
Logged

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Re: JSON object ["mission"] not found
« Reply #4 on: August 20, 2011, 09:01:43 AM »

mission,
datamine,
holdingtheline,
laststand,
longshot,
pirateraid,
showdown,
survival,
safepassage,
testingships,

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile
Re: JSON object ["mission"] not found
« Reply #5 on: August 20, 2011, 09:33:37 AM »

Got mods on? If you deactivate it dose it start as it should? - Because I got that problem too :(

Figured out the "ID" problem - there's a bug in the CSV loaded (now fixed) where it wouldn't handle double quotes in the first line of the spreadsheet only. So if you take them out from the column names, it'll work.


Re: mission issue - having a bit more trouble tracking it down. Can you email me the mod, or something to reproduce the problem? Stuff that looks the same as what you posted works, so the issue is elsewhere...
« Last Edit: August 20, 2011, 09:35:28 AM by Alex »
Logged

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Re: JSON object ["mission"] not found
« Reply #6 on: August 20, 2011, 12:12:14 PM »

Ok, PM'ed a link to you

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile
Re: JSON object ["mission"] not found
« Reply #7 on: August 20, 2011, 12:19:16 PM »

Got it, thanks - yep, that works now too.
Logged

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Re: JSON object ["mission"] not found
« Reply #8 on: August 20, 2011, 12:23:19 PM »

So the new version fixes it? thanks!

-edit-
ok, confirmed it does!
« Last Edit: August 20, 2011, 12:26:24 PM by Avan »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile
Re: JSON object ["mission"] not found
« Reply #9 on: August 20, 2011, 12:26:41 PM »

Yep, turns out it was that issue with the quotes. The mission_list.csv contents you posted earlier were a lie! :)
Logged

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Re: JSON object ["mission"] not found
« Reply #10 on: August 20, 2011, 04:34:53 PM »

it was?
I just copied it out with notepad. O_o

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile
Re: JSON object ["mission"] not found
« Reply #11 on: August 21, 2011, 09:22:29 AM »

The one you sent me has quotes, like this:


"mission",
"bestservedcold",
"datamine",
"holdingtheline",
"infernalmine",
"laststand",
"longshot"," "
"pirateraid",
"showdown",
"survival",
"safepassage",
"testingships",
"nothingpersonal2",

:)

Edit - it's also to an extra column in one of the rows, but that shouldn't matter...
Logged

Salient

  • Ensign
  • *
  • Posts: 6
    • View Profile
Re: JSON object ["mission"] not found
« Reply #12 on: August 21, 2011, 01:26:02 PM »

I get Fatal: JSONObject["id] not found when i try to load up example 2 from your mod thread.
Logged

Avan

  • Admiral
  • *****
  • Posts: 1399
  • Pioneer of Starfarer Modding
    • View Profile
    • DevDB forums
Re: JSON object ["mission"] not found
« Reply #13 on: August 21, 2011, 01:29:10 PM »

this should be fixed in the current release (.35a-rc2)
what build are you using?

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 24125
    • View Profile
Re: JSON object ["mission"] not found
« Reply #14 on: August 21, 2011, 01:35:04 PM »

Yeah, redownloading the game should fix that up. Silly mistake in some CSV parsing code...
Logged