Jump to content

HELP Please - Variable GLOBAL is not declared


Recommended Posts

[00:00:46]: [string "../mods/workshop-381565292/scripts/prefabs/..."]:42: variable 'GLOBAL' is not declared
LUA ERROR stack traceback:
    =[C]:-1 in (global) error © <-1--1>
 

 

=-=-=-

I've made several changes and still can't get it to work.

  

    if GLOBAL.IsDLCEnabled(GLOBAL.REIGN_OF_GIANTS) or GLOBAL.TheSim:GetGameID()=="DST" then inst.components.edible.temperaturedelta = TUNING.COLD_FOOD_BONUS_TEMP else end
 

Link to comment
Share on other sites

@DarkXero, I want to expand and clarify this statement.

 

If your code resides in the scripts folder or a sub folder of the scripts folder you're inside the global environment already, however, all other files will reside outside the global environment.

 

This distinction is needed because certain mods use modimport and all files which use modimport resides outside the global environment.

  • Big Ups 1
Link to comment
Share on other sites

@DarkXero, I want to expand and clarify this statement.

 

If your code resides in the scripts folder or a sub folder of the scripts folder you're inside the global environment already, however, all other files will reside outside the global environment.

 

This distinction is needed because certain mods use modimport and all files which use modimport resides outside the global environment.

 

Ahh - ok, that makes sense.

And it worked !

 

Thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...