crashbash111 / mcdonalds-registersimulator

A NP6 Register Simulator for training purposes only.
25 stars 5 forks source link

Exception thrown at menu when starting up #5

Closed CillyCil closed 4 months ago

CillyCil commented 4 months ago

image

System.NullReferenceException HResult=0x80004003 Message=Object reference not set to an instance of an object. Source=McDonaldsRegisterSimulator StackTrace: at WindowsFormsApp1.Form1.set_MainScreen(Int32 value) in D:\Downloads\mcdonalds-registersimulator-master\mcdonalds-registersimulator-master\Form1.cs:line 68

image

crashbash111 commented 4 months ago

Hi @minecrafterty1 , you've got to aquire POSDATA on your own from a store to use the simulator. Could you confirm for me that you've got a copy of POSDATA, what region the POSDATA was obtained from, and the age of the files.

You can verify how old the files are by checking under Posdata > Manifest > np_61-Store.xml - under any attribute, there should be a TimeStamp property similar to this one:

image

CillyCil commented 4 months ago

image United States Midwest and is from a store

CillyCil commented 4 months ago

I have the NpSharp files too if you need them

crashbash111 commented 4 months ago

I have the NpSharp files too if you need them

Thanks for this. At work at the moment, but will try and investigate this issue later tonight to see if I can recreate it with a 2022 copy I've got of files from NZ/Australia. If I can't recreate it, I'll touch base with you if you don't mind sharing the files with me.

CillyCil commented 4 months ago

Mine should be 2024 copy since we use the latest version in our store

crashbash111 commented 4 months ago

Mine should be 2024 copy since we use the latest version in our store

Hi @minecrafterty1 , I can't seem to recreate the issue with the files I've got - the error seems to imply it can't build any screens. It could just be that the formatting of the screen.xml is drasitcally different in the states. Any chance you can add me on discord and send me a copy of your posdata so I can see if there's a patch I can do? Username: joshimonsta

crashbash111 commented 4 months ago

I've applied some changes to the branch attached to this issue. Can you please test and let me know whether you get a warning that no screens are found. If so, I will likely have to inspect your PosData.

CillyCil commented 4 months ago

I'll test it when I get home in a couple hours

CillyCil commented 4 months ago

image I got to here

CillyCil commented 4 months ago

Most things when I click them say action not implemented but I'm assuming that intended rn

CillyCil commented 4 months ago

And for some reason there are no pictures

crashbash111 commented 4 months ago

And for some reason there are no pictures

Facinating seeing the US POS. Chances are they store the images differently - what's inside your posdata > images folder?

crashbash111 commented 4 months ago

Most things when I click them say action not implemented but I'm assuming that intended rn

Yeah I've got a basic working KVS in another repository, but just need to finish adding combo support to this one before I add it in. Started in another branch but never got it completed.

CillyCil commented 4 months ago

And for some reason there are no pictures

Facinating seeing the US POS. Chances are they store the images differently - what's inside your posdata > images folder?

The images are in a zip, but I extracted them too so I have both

crashbash111 commented 4 months ago

The images are in a zip, but I extracted them too so I have both

That's interesting - the NZ one they stopped zipping images a while ago so I removed the unzip functionality. Putting your images inside of a POS_images subfolder in the images folder should make it work temporarily now.

What was the name of the zipped images? repository.1024x768.zip or something similar?

crashbash111 commented 4 months ago

And for some reason there are no pictures

Facinating seeing the US POS. Chances are they store the images differently - what's inside your posdata > images folder?

The images are in a zip, but I extracted them too so I have both

As this issue has been fixed, I will close this issue and open a new one for the images. I may have to add some code that will scan the image directory for folders and zip files depending on what copy of POSDATA is used.