1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

CTD

Discussion in 'Support Center' started by Travis, Feb 15, 2015.

  1. Travis

    Travis Community Manager

    Country:
    United Kingdom
    Joined:
    Feb 7, 2015
    Messages:
    152
    Likes Received:
    3
  2. Texashawk

    Texashawk Developer
    Staff Member Developer Forum Admin

    Country:
    United States
    Joined:
    Dec 17, 2014
    Messages:
    464
    Likes Received:
    63
    Thanks! I think I can track this down. Did you colonize a planet just before this error?
     
    #2
  3. Travis

    Travis Community Manager

    Country:
    United Kingdom
    Joined:
    Feb 7, 2015
    Messages:
    152
    Likes Received:
    3
    I colonized two, aye.
     
    #3
  4. Texashawk

    Texashawk Developer
    Staff Member Developer Forum Admin

    Country:
    United States
    Joined:
    Dec 17, 2014
    Messages:
    464
    Likes Received:
    63
    Ok. I will fix what I believe to be the issue and push a .411a out tonight. Thanks!
     
    #4
  5. Texashawk

    Texashawk Developer
    Staff Member Developer Forum Admin

    Country:
    United States
    Joined:
    Dec 17, 2014
    Messages:
    464
    Likes Received:
    63
    Well, I could not reproduce this issue so far. It has something to do with when a planet needs resources (food or materials) it makes a check in this procedure. The problem is that this is a terribly written routine with a bunch of if then loops basically checking for relief from a system hub, then a sector hub, then the empire hub. The tortorous part is checking that these objects exist - there is not always a system capital or even a sector capital, and in VB you can't declare a conditional as 'If .... and If curPlanet.SystemCapital IsNot Nothing Then... no, you have to test the IsNot conditional first, and then write an additional conditional if the object exists, and then another loop if the object does not exist, to look for the next eligible object (a system or empire capital). I think I have the issue found but I will need to do what I've been putting off for a while and rewrite this plate of spaghetti, cooked much earlier in my programming development. :)

    TMI answer for ya?

    -Steve
     
    #5
  6. Travis

    Travis Community Manager

    Country:
    United Kingdom
    Joined:
    Feb 7, 2015
    Messages:
    152
    Likes Received:
    3
    I understand the thought process behind programming. I get it. Should be safe to start up a new save, then?
     
    #6
  7. Texashawk

    Texashawk Developer
    Staff Member Developer Forum Admin

    Country:
    United States
    Joined:
    Dec 17, 2014
    Messages:
    464
    Likes Received:
    63
    Yes, but you may get the same error depending on the resource situation.
     
    #7
  8. Texashawk

    Texashawk Developer
    Staff Member Developer Forum Admin

    Country:
    United States
    Joined:
    Dec 17, 2014
    Messages:
    464
    Likes Received:
    63
    OK. Not only do I think I fixed it, I also knocked out almost 500 lines(!) of code doing so! Yay for experience! Anyway, I'll test it tomorrow and if it works I'll send it as .411b.

    -Steve
     
    #8
  9. Travis

    Travis Community Manager

    Country:
    United Kingdom
    Joined:
    Feb 7, 2015
    Messages:
    152
    Likes Received:
    3
    Sounds good!
     
    #9

Share This Page