Jobs Store Support Register

Script Compilation Error with modded game

+
Script Compilation Error with modded game

I have no idea how to fix this.
Error [mod0000_mergedfiles]game\gui\main_menu\ingamemenu.ws(2069): Unexpected end of file found after '{' at line 63

The mods that are merged are: DarkerNights, ExtendedHUD and SlotsSlotsSLOTS. There doesn't seem to be any problem with any other merged files that contain one or more of these mods, only this file.

Here is a pastebin of the entire file:
http://pastebin.com/kdFJYULa

Any help is greatly appreciated!

 
hi guys here i have the same problem
Error [mod0000_mergedfiles]game\gui\main_menu\ingamemenu.ws(2131): Unexpected end of file found after '{' at line 61

https://pastebin.com/XnsZAKHZ

i've been trying to find the right line but with no success can any one help please?

thanks.
 
blade973;n9696791 said:
hi guys here i have the same problem....
There is a problem on line 2118, function declaration before { is missing. Script merger probably messed some things up

Also add } on line 318
 
Last edited:
Compilation error trying to start the gamne, with mods.

First time playing the game, I did run the game fine for a few mins before closing it down to install mods. After a few hours of learning coding to resolve merging errors, and a few "Unexpected "}""s which I just removed on my own, I'm down to this 1 error, which I could not find a solution to.

Code:
Error [mod0000_mergedfiles]game\player\playerwitcher.ws(4668): syntax error, unexpected TOKEN_ELSE, expecting TOKEN_FUNCTION, near 'else'
This seems to be within the Complete Animations mod area, below is the code before and after, with the relevant 'else' in red.
And here is the Pastebin for my full playerwitcher.ws

Code:
GetItemEquippedOnSlot(slot, item);
        if(inv.ItemHasTag(item, 'Edibles'))
        {
            // CA            
            if (!CAAllowAnimsInCombat() && thePlayer.IsInCombat()) {
                ConsumeItem(item);
                return;
            }
            completeAnims.SetItemToConsume( item );
            if ( inv.ItemHasTag(item, 'Drinks')) {
                if (CADrinkAnimOn()) {
                    completeAnims.DrinkAnim('CAConsume');
                } else {
                    ConsumeItem(item);
                }
            } else {
                if (CAEatAnimOn()) {
                    completeAnims.EatAnim();
                } else {
                    ConsumeItem(item);
                }
            }
            // CA
        } [COLOR=#FF0000] [SIZE=12px][I][U][B]               } else {[/B][/U][/I][/SIZE][/COLOR]
                     ConsumeItem(item);
                }
            }
            // CA
        else
        {            
            if (ToxicityLowEnoughToDrinkPotion(slot))
            {
                // CA
                if (!CAAllowAnimsInCombat() && thePlayer.IsInCombat()) {
                    DrinkPreparedPotion(slot);
                    return;
                }

                if (CADrinkAnimOn()) {
                    completeAnims.SetSlotToConsumeOne( slot );
                    completeAnims.DrinkAnim('CADrinkPotion', slot);
                } else {
                    DrinkPreparedPotion(slot);
                    return;
                }

                if (CADrinkAnimOn()) {
                    completeAnims.SetSlotToConsumeOne( slot );
                    completeAnims.DrinkAnim('CADrinkPotion', slot);
                } else {
                    DrinkPreparedPotion(slot);
                }
                // CA
                }
                // CA
            }
            else
            {
                SendToxicityTooHighMessage();
            }

        hud = (CR4ScriptedHud)theGame.GetHud(); 
        if ( hud ) 
        { 
            module = (CR4HudModuleItemInfo)hud.GetHudModule("ItemInfoModule");
            if( module )
            {
                module.ForceShowElement();
            }
        }
I'm on latest (1.31?) GOTY edition, running off GOG Galaxy client.
Windows 10 64-bit.

Would reaaaaaaaaaaaally appreciate if someone could help me with this!

Thanks in advance.
 
I can see why the code snippet you posted would be throwing errors (the red else has more indentation than the function it's trying to call), but the Pastebin file is OK in that regard. Wonky forums, I guess.

What other mods are you using that modify playerWitcher.ws?
 
RidiculousName;n9747291 said:
What other mods are you using that modify playerWitcher.ws?
RidiculousName;n9747291 said:
d else has more indentation than the function it's trying to call), but the Pastebin file is OK in that regard. Wonky forums, I guess.
Hi! That was some really fast response, thank you!

The snippet indentation was probably me screwing up from trying to make it pop up :p

Here's a screenshot of NMM, which shows the bulk of my mods (there were a few that needed manual installation).

Off the top of my head I can remember FHUD, CA and Autoloot being the main source of merge errors.

Capture.PNG.jpg
 
Going to shift this just...slightly to the left...into Mod Discussions.

And...there we go.
 
Hi, welcome!

You said it’s the first time you are modding TW3? Perhaps you know it, but here’a a comprehensive guide written by one of the best tw3 modders out there: https://wghost81.wordpress.com/2017/10/04/basic-guide-to-installing-the-witcher-3-mods/

second, unrelatedly, you have quite a lot of cosmetic mods on your list, are you using the Witcher 3 Mod merger? https://www.nexusmods.com/witcher3/mods/1931/?
if not, your modded game won’t even launch - I can guarantee you that.

third, NMM is not really the best way to go ahead modding TW3, here’s a better mod manager customised for TW3: https://www.nexusmods.com/witcher3/mods/2678/?

fourth, I assume you are using script merger, right?

And now for the code, it doesn’t seem like you are using any other mod modifying this particular piece of code - perhaps have a look at CA’s playerwitcher file again and copy the code from there (if you are manually merging)?
 
Ah one more thing, you had Auto-Loot on the list, right? I think i remember there was a CA+AutoLoot merge already on the CA nexus-page... so you might want to use that!
 
Hi! Thanks SigilFrey for moving my thread to a more appropriate place!

rfuzzo, thanks for the warm welcome and tips!

Today I uninstalled all mods from NMM, and extracted them into non-compressed folders in NMM's downloads directory, then re-installed them using the Mod Manager specially for Witcher 3.
Then I merged the scripts using script merger, and went through a bunch of conflicts, just like last time.
Then I used the Mod Merger and merged all 'recommended' mods.

Now, I got different script compilation errors. After quickly fixing the "unexpected }" errors, I got these 2:
Code:
Error [mod0000_mergedfiles]game\player\playerwitcher.ws(456): syntax error, unexpected TOKEN_IDENT, expecting TOKEN_FUNCTION, near 'ftPack'
Error [mod0000_mergedfiles]game\player\r4player.ws(15283): Unexpected end of file found after '{' at line 4146
After trying some random stuff which didn't help, I reverted those files back to "default", where the same 2 errors are produced, and put them in pastebin below
r4player.ws
playerWitcher.ws

The mods used are still the same as before, and I'm using the merged CA + AutoLoot (but I'm also using FHUD, which there's a separate 'merged' script for by the author, what should I do about that?)

Could you please take another look and see if there's anything I should try?
 
Hej, no worries.

about those two errors: both are from poor merges. I don't know if you merged manually, but it seems script merger messed up - that is common, when you have a lot of mods. TW3 modding requires some effort, so look at the mod's files if there's errors and try to compare the code with the merged files. if script merger doesn't do it. usually it is very good though.

about the first error: poor merge with ice breath. here's a snippet.

Code:
theGame.GameplayFactsAdd( "PlayerIsGeralt" );

        isInitialized = true;


        //Ice Breath
        iceBreath = new CIceBreath in this;
        AddTimer('IceBreathTimer',5.0,true);
        //Ice Breath*/

        // mod Fast Travel Pack
            ftPack = new FastTravelPack in this;
            ftPack.Init();
        // mod Fast Travel Pack
    }


    //Ice Breath+
    timer function NPCbreathTimer(deltaTime : float , id : int){

        if(enableIceBreath){
            iceBreath.IceBreathEnable();
        }
        else{
            iceBreath.IceBreathDisable();
        }
    }

about the second one: there's a missing curly brace at the end of r4player. (immersive sounds poor merge).

Code:
}

exec function ttt()
{
    thePlayer.AddTimer( 'TestTimer', 5, false );
}
I dunno, I don't use these two mods, and I wont go through the whole file, but try disabling some mods and adding them gradually until you get errors.

about the CA-auto loot merged files. I don't use the method the mod author recommends - I find it unintuitive. usually I download the pre-merged patch files, call them mod0something and leave it in script merger unresolved - this way, the game chooses the alphabetically higher up mod. but, google it, read the forum, there is no one way. CA mod author has a nice summary on how to use pre-merged files...

good luck! :)
 
justynaps;n9780531 said:
Can somebody help me with this?
All you need to do is add one } on line 1057.

Edit: Forum apparently hates codes, so I'll just send you a fixed file in PM.
 
Last edited:
Hello all, I have been having a similar problem and would greatly appreciate some help.
The error I have been recieving is:

"Error [mod0000_mergedfiles]game\gui\main_menu\ingamemenu.ws(2192): Unexpected end of file found after '{' at line 65"

Thanks!
 
Phosyrgo;n9819621 said:
Hello all, I have been having a similar problem and would greatly appreciate some help.
The error I have been recieving is:

"Error [mod0000_mergedfiles]game\gui\main_menu\ingamemenu.ws(2192): Unexpected end of file found after '{' at line 65"

Thanks!
We're going to need more info than that, although I can already guess you're having the same issue as justynaps above.

I'd recommend pasting your ingameMenu.ws in Pastebin and posting the link to the generated paste. That way it's easy to find the issue and, assuming it's indeed a broken function, to fix it as well.
 
RidiculousName;n9819761 said:
We're going to need more info than that, although I can already guess you're having the same issue as justynaps above.

I'd recommend pasting your ingameMenu.ws in Pastebin and posting the link to the generated paste. That way it's easy to find the issue and, assuming it's indeed a broken function, to fix it as well.
https://pastebin.com/7PA4Z8ee
There she is in all her glory.
 
RidiculousName;n9822301 said:
All right, found the issue.

Now that I know the forum hates code, I'll just send you a PM straight away.
Many thanks for the help, it solved the issue in question... however, there is now a new error. it reads:

Error [mod0000_mergedfiles]game\gui\main_menu\ingamemenu.ws(309): Could not find function 'RefreshMainMenuAfterContentLoaded'

Would you perchance know how to fix this error as well, or should I see if it is already answered on another forum?