• Welcome to SC4 Devotion Forum Archives.

Error on creation of Opera House desc

Started by M4346, January 30, 2017, 05:34:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

M4346

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

CasperVg

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.

ItemOrderForOpera      = 300
QueryForOpera       = 0x12121201

Follow my SimCity 4 Let's play on YouTube

vortext

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

M4346

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

CasperVg

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


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

Andreas

#5
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

QueryForResidential = 0x00000001
QueryForCommercial = 0x00000002
QueryForIndustrial = 0x00000003


which are used instead of the default Maxis values.
Andreas

mgb204

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.