Menu

LEX File Exchange
EA Support Files
SC4 Wikipedia
Network Addon Mod
Dependencies
Chat

Author Topic: Error on creation of Opera House desc  (Read 2872 times)

0 Members and 1 Guest are viewing this topic.

Offline M4346

  • NHP Team
  • Forums Parliamentarian
  • *
  • Posts: 1744
  • Total likes: 33
  • Reputation: 17
  • M, Super M
    • M's FB
Error on creation of Opera House desc
« on: January 30, 2017, 07:34:28 AM »
Afternoon one and all!

I get the following error when I try to create a .desc file for an Opera House:

Quote
[(u'Students', u'(max(SCCSOpera,50*int(1+Volume/40000.)))'), (u'CivicJobs', u'(int(ceil(Students/30.)))'), (u'Jobs1', u'(5+int(CivicJobs*1./8.))'), (u'Jobs2', u'(2+int(CivicJobs*5./8.))'), (u'Jobs3', u'(0+int(CivicJobs*2./8.))'), (u'Radius', u'(40*int(135+0.75*Students**0.4))'), (u'MCost', u'(10*int(13+0.035*Students**0.9))'), (u'PCost', u'(1000*int(20+0.020*Students**1.1))'), (u'BCost', u'(20*int(15+0.025*Students**1.1))'), (u'BaseCapacity', u'(round(3+Volume/(3*15)))'), (u'BiasedBC', u'(int(round(min(500.,BaseCapacity)*max(1.,sqrt(BaseCapacity/500.)))))'), (u'AirPollutionFactor', u'(0.006)'), (u'WaterPollutionFactor', u'(0.004)'), (u'GarbagePollutionFactor', u'(0.003)'), (u'PowerConsumedFactor', u'(0.01)'), (u'WaterConsumedFactor', u'(0.04)'), (u'CalculatedElevation', u'(max(Height,Volume/(Width*Depth)))'), (u'BiasedVol', u'(Volume*min(1,0.51+(Volume/26000.0)**2))')]
ItemOrderForOpera
Traceback (most recent call last):
  File "treeDnD.pyo", line 93, in OnData
  File "SC4PIMApp.pyo", line 2918, in OnDrop
  File "SC4PIMApp.pyo", line 2988, in CreateAnExamplar
  File "<string>", line 0, in ?
NameError: name 'ItemOrderForOpera' is not defined

I think the main error is the issue highlighted in the last line.

Is there any way I can fix this? Or has this been addressed?

Thanks!

M
New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dedgren ♦ dmscopio ♦ Ennedi
emilin ♦ Heblem ♦ jplumbley ♦ moganite ♦ M4346 ♦ papab2000
Shadow Assassin ♦ Tarkus ♦ wouanagaine

Offline CasperVg

  • Administrator
  • Forums Guru
  • *
  • Posts: 2884
  • Total likes: 421
  • Reputation: 47
  • CL:
    The Go-To Guy!!
Re: Error on creation of Opera House desc
« Reply #1 on: January 30, 2017, 08:54:48 AM »
Do you have a config.ini file in the SC4PIM directory? If yes, does it contain the following lines of text? If you have a config.ini with this content and it still crashes, then it might be a bug.

Code: [Select]
ItemOrderForOpera      = 300
QueryForOpera       = 0x12121201

Offline vortext

  • Administrator
  • Forums Guru
  • *
  • Posts: 3364
  • Total likes: 575
  • Reputation: 23
  • CL:
    Street Smarts
Re: Error on creation of Opera House desc
« Reply #2 on: January 30, 2017, 09:01:25 AM »
Yep, had the same issue and can confirm Casper's suggestion fixed it on my end. Though in my case the file is called settings.ini.
time flies like a bird
fruit flies like a banana

Offline M4346

  • NHP Team
  • Forums Parliamentarian
  • *
  • Posts: 1744
  • Total likes: 33
  • Reputation: 17
  • M, Super M
    • M's FB
Re: Error on creation of Opera House desc
« Reply #3 on: January 30, 2017, 09:08:58 AM »
Thanks! I don't have a config.ini file, I have a settings.ini file (not sure why, I reinstalled the SC4PIM to see if that fixes it, it doesn't) so I have added that info to the settings.ini file and it seems to have fixed it!
New Horizons Productions
Berethor ♦ beskhu3epnm ♦ blade2k5 ♦ dedgren ♦ dmscopio ♦ Ennedi
emilin ♦ Heblem ♦ jplumbley ♦ moganite ♦ M4346 ♦ papab2000
Shadow Assassin ♦ Tarkus ♦ wouanagaine

Offline CasperVg

  • Administrator
  • Forums Guru
  • *
  • Posts: 2884
  • Total likes: 421
  • Reputation: 47
  • CL:
    The Go-To Guy!!
Re: Error on creation of Opera House desc
« Reply #4 on: January 30, 2017, 01:21:52 PM »
The config and settings.ini files are actually quite interesting. They are interpreted as code by SC4PIM. So if you add the following lines to one of them, an extra window with the title "Hello" will be fired up each time you start SC4PIM. The more you know :P

Code: [Select]
import wx
app = wx.App(False)
frm = wx.Frame(None, wx.ID_ANY, "Hello")
frm.Show(True)
Follow my SimCity 4 Let's play on YouTube

Offline Andreas

  • Administrator
  • Forums Legend
  • *
  • Posts: 4769
  • Total likes: 978
  • Reputation: 33
    • SimCityPlaza
  • CL: ()bobby() Transit Controller
Re: Error on creation of Opera House desc
« Reply #5 on: January 30, 2017, 02:16:43 PM »
IIRC, the "settings.ini" is the default ini file, and the "config.ini" (which is using the very same format) can be used for custom additions and overrides. If you're using a set of custom queries for your lots, you could add some lines like

Code: [Select]
QueryForResidential = 0x00000001
QueryForCommercial = 0x00000002
QueryForIndustrial = 0x00000003

which are used instead of the default Maxis values.
« Last Edit: January 30, 2017, 02:20:36 PM by Andreas »
Andreas

Offline mgb204

Re: Error on creation of Opera House desc
« Reply #6 on: January 30, 2017, 04:02:27 PM »
Useful advice right here  :D.

Now I no longer have to manually adjust the item order to be at the top of the parks menu when making test lots, thanks Casper/Andreas.