Forum Announcement, Click Here to Read More From EA_Cade.

Error in billing that will cause a Last Exception

@SimGuruModSquad,
Hi! Just to let you know, if it's not already known, in the billing code there is an error that will cause an LE. It's in the service_npc_manager module in ServiceNpcService._run_bill_collection. The problem is the code below:
if total_cost > 0:
(paid_amount, billed_amount) = service_npc_type.try_charge_for_service(household, total_cost)
if billed_amount > 0:


This can cause problems if total_cost <= 0 because "billed_amount" never gets initialized, so the if condition checking it if "billed_amount > 0" throws an LE, "UnboundLocalError: local variable 'billed_amount' referenced before assignment".

Hope everyone there has a great Thanksgiving! ;)

Comments

  • DeaderpoolDeaderpool Posts: 187 Member
    edited November 2017
    I think this is caused if someone is not living on a lot with their active Sim...living on the street, as it were. I know there are some challenges out there that people play that they do that. Just a guess, though. :)
  • SimGuruModSquadSimGuruModSquad Posts: 597 Member
    Thanks a lot for reporting @Deaderpool. We'll take a look, probably after Thanksgiving :)
Sign In or Register to comment.
Return to top