system_lib.lua location ?

So I have big trouble in finding this lua file.Any simple modification inside sr3_city.lua under the function sr3_city_main() crashes my game and the error I have is :
PANIC: unprotected error in call to Lua API ([string "system_lib.lua"]:54: attem
pted to read undefined global variable 'SR3_CITY_globals')

I use Minimaul's LUA debug_print hook and as you can see it shows me that there is a problem in calling some function from system_lib.lua.

I am 100% sure that the code I put inside sr3_city_main() function has a correct syntax and I tried all the basic functions such as portals_enable,notoriety_set_min_and_max,turn_invulnerable...nothing works ! I even copied and pasted some code from a mission to be assured that it's 100% correct but it still crashes with that error.

Again,I'm absolute sure that I don't do any syntax errors as I have modded alot in SR2 and SR:TT using lua...

So,I think finding sytem_lib.lua will answer some of my questions.
 
While I'm not sure where that file gets packaged to, I can say that it's probably not actually a problem in system_lib.lua. That particular error references system_lib.lua because of how we use lua metatables to store data that allows us to more easily forcibly load and unload the mission scripts.

Without seeing your actual lua file it's hard to provide much more help than that. If you did copy/paste from a mission, it's possible that those included references to something within the mission script that sr3_city would know about during the execution of main.
 
While I'm not sure where that file gets packaged to, I can say that it's probably not actually a problem in system_lib.lua. That particular error references system_lib.lua because of how we use lua metatables to store data that allows us to more easily forcibly load and unload the mission scripts.

Without seeing your actual lua file it's hard to provide much more help than that. If you did copy/paste from a mission, it's possible that those included references to something within the mission script that sr3_city would know about during the execution of main.

Well this is what I tried so far,these are the simpliest codes I could ever wrote inside sr3_city_main() :

Code:
function sr3_city_main()
notoriety_force_no_spawn(true)
end
Code:
function sr3_city_main()
    player_super_attacks_enable(false)
    player_super_movement_enable(false)
end
Code:
function sr3_city_main()
    turn_invulnerable(LOCAL_PLAYER)
end

And this list could continue forever...Nothing writted above works,the game crashes upon loading a save.If you ever have the time to tell me a potential solution,I would gladly greet it.
 
Back
Top