Modme Forums

How to Add script file, Implement and Run ?

Game Modding | Call of Duty: Black Ops 3 | Scripting


ModmeBot:

Thread By: Another
Hello, I want to clarify my scripts and i create a script file that are located in my map folder : usermap/mapname/scripts/zm

My script file is named :zm_s_testing

He runs only one and simple function (except main function), this one :

function init()
{
     thread exemple();
}

function exemple()
{
     wait 5;
     IPrintLnBold("^2Test");
}

But i don't know how to implement and run in my mapname.gsc

I try to put #using scripts\zm\zm_s_testing; under#using scripts\zm\usermap;
And level thread zm_s_testing::init(); but i always get aLinking Error when i load ingame.

What do i have to do ?


ModmeBot:

Reply By: Abnormal202
Did you remember to include your new .gsc in your mapname.zone?

Open your mapname.zone located in ROOT/usermaps/yourmapname/zone_source and parse the script by adding this line to the bottom:

scriptparsetree,scripts/zm/zm_s_testing.gsc


If that doesn't work, can you post the error you're getting while linking in launcher?


ModmeBot:

Reply By: Harry Bo21

Abnormal202
Did you remember to include your new .gsc in your mapname.zone? Open your mapname.zone located in ROOT/usermaps/yourmapname/zone_source and parse the script by adding this line to the bottom: scriptparsetree,scripts/zm/zm_s_testing.gsc If that doesn't work, can you post the error you're getting while linking in launcher?

He means the

error linking mapname.gsc

so yes it’s not parsed in zone


ModmeBot:

Reply By: Another

Abnormal202
Did you remember to include your new .gsc in your mapname.zone? Open your mapname.zone located in ROOT/usermaps/yourmapname/zone_source and parse the script by adding this line to the bottom: scriptparsetree,scripts/zm/zm_s_testing.gsc If that doesn't work, can you post the error you're getting while linking in launcher?


That was that, i forgot. Thanks dude

(+win)