So I have my game hooked up to a server and I’m working on an inventory system. Basically each item is saved as a 13 digit code, where each number defines a parameter of the item that’s being stored. Then that number gets uploaded, and then called when the player accesses their inventory. However, I’m running into some weird issues.
I’ve been trying to use modulo to isolate each section of the number, and it’s been working for the most part, but towards the end when I try to do, say 1123334445566 % 10000, i should be getting 5566, but UE4 is getting 0. Similarly, if I try to do say 1123334445566 % 100, it should be 66, but the engine ends up with a ridiculously large negative number.
I thought it might have something to do with floats, but when I tried to convert the “code” to an integer, it once again turns into a massive negative number out of the blue? Is my number too big for UE4 to handle? And if so, what should I do to get around this?