Forums
Games
Cyberpunk 2077 Thronebreaker: The Witcher Tales GWENT®: The Witcher Card Game The Witcher 3: Wild Hunt The Witcher 2: Assassins of Kings The Witcher The Witcher Adventure Game
Jobs Store Support Log in Register
Forums - CD PROJEKT RED
Menu
Forums - CD PROJEKT RED
  • Hot Topics
  • NEWS
  • GENERAL
    THE WITCHER ADVENTURE GAME
  • STORY
    THE WITCHER THE WITCHER 2 THE WITCHER 3 THE WITCHER TALES
  • GAMEPLAY
    THE WITCHER THE WITCHER 2 THE WITCHER 3 MODS (THE WITCHER) MODS (THE WITCHER 2) MODS (THE WITCHER 3)
  • TECHNICAL
    THE WITCHER THE WITCHER 2 (PC) THE WITCHER 2 (XBOX) THE WITCHER 3 (PC) THE WITCHER 3 (PLAYSTATION) THE WITCHER 3 (XBOX) THE WITCHER 3 (SWITCH)
  • COMMUNITY
    FAN ART (THE WITCHER UNIVERSE) FAN ART (CYBERPUNK UNIVERSE) OTHER GAMES
  • RED Tracker
    The Witcher Series Cyberpunk GWENT
THE WITCHER
THE WITCHER 2
THE WITCHER 3
MODS (THE WITCHER)
MODS (THE WITCHER 2)
MODS (THE WITCHER 3)
Menu

Register

Script Compilation Error with modded game

+
  • 1
  • 2
  • 3
  • …

    Go to page

  • 29
Next
1 of 29

Go to page

Next Last
A

Algerith

User
#1
Nov 19, 2016
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!

 
  • RED Point
Reactions: artemaxd
M

Murzinio

User
#2
Nov 19, 2016
Add } in line 777.
 
B

blade973

User
#3
Oct 15, 2017
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.
 
S

stefan3372

User
#4
Oct 16, 2017
blade973;n9696791 said:
hi guys here i have the same problem....
Click to expand...
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: Oct 16, 2017
F

Firedrops

User
#5
Oct 28, 2017
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.
 
Draconifors

Draconifors

Moderator
#6
Oct 28, 2017
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?
 
F

Firedrops

User
#7
Oct 28, 2017
RidiculousName;n9747291 said:
What other mods are you using that modify playerWitcher.ws?
Click to expand...
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.
Click to expand...
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
 
SigilFey

SigilFey

Moderator
#8
Oct 30, 2017
Going to shift this just...slightly to the left...into Mod Discussions.

And...there we go.
 
rfuzzo

rfuzzo

User
#9
Oct 30, 2017
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)?
 
rfuzzo

rfuzzo

User
#10
Oct 30, 2017
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!
 
F

Firedrops

User
#11
Oct 31, 2017
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?
 
rfuzzo

rfuzzo

User
#12
Oct 31, 2017
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! :)
 
J

justynaps

User
#13
Nov 2, 2017
And I have this same problem:

Error [mod0000_mergedfiles]game\player\playerinput.ws(3368): Unexpected end of file found after '{' at line 11

https://pastebin.com/zbYJYF0G

Can somebody help me with this?
 
Draconifors

Draconifors

Moderator
#14
Nov 2, 2017
justynaps;n9780531 said:
Can somebody help me with this?
Click to expand...
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: Nov 2, 2017
P

Phosyrgo

User
#15
Nov 10, 2017
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!
 
Draconifors

Draconifors

Moderator
#16
Nov 10, 2017
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!
Click to expand...
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.
 
Gilrond-i-Virdan

Gilrond-i-Virdan

User
#17
Nov 10, 2017
I prefer to merge stuff manually. Use Meld to do that.
 
P

Phosyrgo

User
#18
Nov 10, 2017
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.
Click to expand...
https://pastebin.com/7PA4Z8ee
There she is in all her glory.
 
  • RED Point
Reactions: Draconifors
Draconifors

Draconifors

Moderator
#19
Nov 10, 2017
Phosyrgo;n9822271 said:
https://pastebin.com/7PA4Z8ee
There she is in all her glory.
Click to expand...
All right, found the issue.

Now that I know the forum hates code, I'll just send you a PM straight away.
 
P

Phosyrgo

User
#20
Nov 10, 2017
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.
Click to expand...
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?
 
  • 1
  • 2
  • 3
  • …

    Go to page

  • 29
Next
1 of 29

Go to page

Next Last
Share:
Facebook Twitter Reddit Pinterest Tumblr WhatsApp Email Link
  • English
    English Polski (Polish) Deutsch (German) Русский (Russian) Français (French) Português brasileiro (Brazilian Portuguese) Italiano (Italian) 日本語 (Japanese) Español (Spanish) 简体中文 (Chinese)

STAY CONNECTED

Facebook Twitter YouTube
CDProjekt RED Mature 17+
  • Contact administration
  • User agreement
  • Privacy policy
  • Cookie policy
  • Press Center
© 2018 CD PROJEKT S.A. ALL RIGHTS RESERVED

The Witcher® is a trademark of CD PROJEKT S. A. The Witcher game © CD PROJEKT S. A. All rights reserved. The Witcher game is based on the prose of Andrzej Sapkowski. All other copyrights and trademarks are the property of their respective owners.

Forum software by XenForo® © 2010-2019 XenForo Ltd.