Jump to content
Iter

Error when accessing ushort in patched method

2 posts in this topic Last Reply

Highlighted Posts

I created a class that extends OutsideConnectionAI within the Assembly-CSharp assembly. In my SimulationStep I attempt to print the value of the buildingID but it's giving me an 'Attempt to access invalid address' error.

 

Stacktrace

Method snippet

Share this post


Link to post
Share on other sites

Can you share the full class and the code where you assign it to a building?

To me it seems like you are trying to write a message to the log panel while the panel is not ready yet (the font renderer is not initialized).

Just replace your DebugOutputPanel calls with Debug.Log(...)

You can use ModTools console (F7) to find those log calls ingame, or open the output_log.txt

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an Account  

Sign up to join our friendly community. It's easy!  

Register a New Account

Sign In  

Already have an account? Sign in here.

Sign In Now


  • Recently Browsing   0 members

    No registered users viewing this page.

×

Thank You for the Continued Support!

Simtropolis relies mainly on member donations to continue operating. Without your support, we just would not be able to be entering our 15th year online!  You've really help make this a great community.

But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running, so that we can help keep bringing SimCity players together to share our creations.

Make a Donation, Get a Gift!

Expand your city with the best from the Simtropolis Echange.
Make a donation and get one or all three discs today!

stexcollection-header.png

By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

Each donation helps keep Simtropolis online, open and free!

Thank you for reading and enjoy the site!

More About STEX Collections