Product Chat / [SOLVED] Runtime error 301(loading main) on player death

Author
Message
Medmatheus
Reviewed GameGuru on Steam
8
Years of Service
User Offline
Joined: 18th Oct 2015
Location:
Posted: 24th Jun 2020 18:29
I was about to call "Work done", but then I died and that happened:



That started to happen after I add the boss mechanics to my game. After days of grinding, I cant see wheres the error in the code below:



I dont understand whats GG is calling on player death that could result in this error. I removed this script from the map and it worked fine.

The author of this post has marked a post as an answer.

Go to answer
cybernescence
GameGuru Master
11
Years of Service
User Offline
Joined: 28th Jan 2013
Playing: Cogwheel Chronicles
Posted: 24th Jun 2020 19:59
This post has been marked by the post author as the answer.
It's possibly because you're setting g_ai_boss1_state = 1 on g_PlayerHealth <= 0, if the sprites have been deleted at this point they can't be then positioned?

Cheers.

GPU: GeForce RTX 2070 SUPER PassMark: 14817
Medmatheus
Reviewed GameGuru on Steam
8
Years of Service
User Offline
Joined: 18th Oct 2015
Location:
Posted: 24th Jun 2020 20:06
@cybernescence I changed it to always active = no and its somehow working. I'll add one more condition together with g_PlayerHealth <= 0 so player only trigger this if the boss already created the sprite. Thank you!
Medmatheus
Reviewed GameGuru on Steam
8
Years of Service
User Offline
Joined: 18th Oct 2015
Location:
Posted: 24th Jun 2020 22:19
on exit function, I had to use this (to work after saving / loading in standalone):

3com
9
Years of Service
User Offline
Joined: 18th May 2014
Location: Catalonia
Posted: 25th Jun 2020 06:32
@ Medmatheus
Maybe you want to take a look at Understanding PREEXIT system, in global.lua file.
Laptop: Lenovo - Intel(R) Celeron(R) CPU 1005M @ 1.90GHz

OS: Windows 10 (64) - Ram: 4 gb - Hd: 283 gb - Video card: Intel(R) HD Graphics
cpu mark: 10396.6
2d graphics mark: 947.9
3d graphics mark: 8310.9
memory mark 2584.8
Disk mark: 1146.3
Passmark rating: 3662.4

PM

Login to post a reply

Server time is: 2024-03-28 19:17:50
Your offset time is: 2024-03-28 19:17:50