#Scripting error while trying to make a mana/energy system

1 messages ยท Page 1 of 1 (latest)

wise flame
dusky mantle
#

@wise flame

wise flame
#

Whats up

dusky mantle
#

Where the main.js ?

wise flame
#

I have it imported into the main.js

dusky mantle
#

Show me

wise flame
dusky mantle
#

That s not how to import things

wise flame
# wise flame

I just realized I sent the wrong version of this. I meant to send the version before I tried fixing it

wise flame
dusky mantle
#

const def = new DynamicPropertiesDefinition()
def.defineNumber("maxEnergy")
def.defineNumber("currentEnergy

wise flame
dusky mantle
#

Use world.setDynamicProprety("maxEnergy")

#

And get

#

Use set and get

#

To do that work

wise flame
#

Okay

dusky mantle
#

Did u steal it ? @wise flame

#

._.

wise flame
dusky mantle
#

Yeah because the codes in it

#

Aren't valid anymore

wise flame
#

Oh that makes alot of sense for why I keep getting alot of errors

dusky mantle
#

Do u have some js experience ?

wise flame
#

A little bit but I'm still fairly new to js

dusky mantle
#

Yeah

#

So ._. u don't know how to fix it ?

#

Or what to add right?

wise flame
#

Yes

dusky mantle
#

Ok ._.

#

Hmm , i can fix it for u but ._, my pc isn't with me now and it s 1 am

#

So....

#

U have one solution, downgrade u script api version to match the one of that add-on

wise flame
#

Alright sure