why is my game crashing in the editor, but it works just fine in the project manager

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By strangerturtle

I am making a multiplayer game and have been tinkering with interpolation. The code for the interpolation is a Frankenstein of tutorials and documentation and looks like global_transform = global_transform.interpolate_with(world_state_buffer[0]["P"], delta * 16) For some reason, it stops working when i press f5 and says Invalid get index 'P' (on base: 'Dictionary'). It works completely fine when I start the server and get two clients to join through the project manager. Can somebody please tell me how to fix this?

How is that world_state_buffer created, and what’s in it?

jgodfrey | 2022-10-06 16:48

I have an array that stores 2 player states so I can lerp between them for hitscan stuff, but it does not look good when I interpolate between the two, so I just use the position key from the oldest part of the array (each of the two parts of the array are dictionaries) and interpolate that with the global transform

strangerturtle | 2022-10-07 01:17