ExtreamChaozZ

Estimable
Dec 24, 2014
5
0
4,510
Hiya,

I have been having trouble trying to work this error out, im not very good at programming so any advice would be great.

The error occurred due to me merging scripts for the witcher 3 as im modding it. I fixed all other errors that popped up with a script merger but this last error has me going insane.

Error [mod0000_mergedfiles]game\r4game.ws(2477): Found unexpected '}'

I have put the "r4game.ws" file into a text editor, in my case Sublime Text as it supports coding and sure enough it shows me there is a problem with line 2477.

I have narrowed down that the problem lies between lines 913 - 1093, i think anway im not 100% sure as i dont know much about programming.

By looking at this error i would deduce that maybe an opening "{" is missing but its not, and theres no break between the opening "{" and the closing "}", so im not sure whats the problem.

Trying to work this out is confusing the hell out of me so any help would be fantastic.

r4game.ws file: https://pastebin.com/YDqFa39b
Image to error: https://imgur.com/412xQAB
 
Solution
correct, you need to make sure that all functions can be found.

You also have a problem where you are calling functions with the wrong type or number of parameters.

ExtreamChaozZ

Estimable
Dec 24, 2014
5
0
4,510


I did notice that while scanning through the code, only problem though is when i remove the "]" on line 968 i get the following errors.

Error [content0]game\gameplay\alchemy\alchemymanager.ws(196): Could not find function 'GetUnusedMutagensCount'
Error [content0]game\gameplay\alchemy\alchemymanager.ws(270): Could not find function 'RemoveUnusedMutagensCount'
Error [modmapquestobjectivesfull]game\player\playerwitcher.ws(734): Function 'SetItemStackable' does not take 2 param(s)
Error [modmapquestobjectivesfull]game\player\playerwitcher.ws(739): Function 'SetItemStackable' does not take 2 param(s)
Error [modmapquestobjectivesfull]game\player\playerwitcher.ws(744): Function 'SetItemStackable' does not take 2 param(s)
Error [modmapquestobjectivesfull]game\player\playerwitcher.ws(749): Function 'SetItemStackable' does not take 2 param(s)
Error [modmapquestobjectivesfull]game\player\playerwitcher.ws(789): Function 'SetItemStackable' does not take 2 param(s)
Error [modmapquestobjectivesfull]game\player\playerwitcher.ws(793): Function 'SetItemStackable' does not take 2 param(s)
Error [modmapquestobjectivesfull]game\player\playerwitcher.ws(797): Function 'SetItemStackable' does not take 2 param(s)
Error [modmapquestobjectivesfull]game\player\playerwitcher.ws(801): Function 'SetItemStackable' does not take 2 param(s)
Error [modmapquestobjectivesfull]game\player\playerwitcher.ws(5474): Function 'SplitItem' does not take 2 param(s)
Error [content0]game\vehicles\horse\horsecomponent.ws(189): Function 'GetCategoryDefaultItem' does not take 1 param(s)
Error [modcustomlocalizationfix]game\gui\menus\charactermenu.ws(253): Could not find function 'GetFirstUnusedMutagenByName'
Error [modcustomlocalizationfix]game\gui\menus\charactermenu.ws(708): Could not find function 'GetUnusedMutagensCount'
Error [modcustomlocalizationfix]game\gui\menus\charactermenu.ws(721): Could not find function 'GetUnusedMutagensCount'
Error [modcustomlocalizationfix]game\gui\menus\charactermenu.ws(734): Could not find function 'GetUnusedMutagensCount'
Error [modcustomlocalizationfix]game\gui\menus\listbasemenu.ws(186): Could not find function 'GetUnusedMutagensCount'
Error [content0]game\gameplay\ability\playerabilitymanager.ws(623): Function 'SetItemStackable' does not take 2 param(s)
Error [content0]game\gameplay\ability\playerabilitymanager.ws(4031): Could not find function 'RemoveUnusedMutagensCountById'

Warning [content0]engine\environment.ws(30): Global native function 'EnableDebugOverlayFilter' was not exported from C++ code.
Warning [content0]engine\environment.ws(32): Global native function 'EnableDebugPostProcess' was not exported from C++ code.
Warning [content0]engine\showflags.ws(11): Global native function 'DebugSetEShowFlag' was not exported from C++ code.


Is there anything else that i might of missed that could be causing a problem?
 

asoroka

Distinguished
Apr 19, 2009
46
0
18,610
you now have symantic errors (meaning) rather than syntax (spelling).

So where is function 'GetUnusedMutagensCount' defined, looks like you have to include more code (external) into your project. You seem to have link errors
 

ExtreamChaozZ

Estimable
Dec 24, 2014
5
0
4,510


I see, so rather than the syntax being wrong some of the coding has been messed up probably from the script merge. In order to fix this would i have to enter code to allow the script to find other sections of the script such as "GetUnsedMutagensCount"?

Heres the script where "GetUnsedMutagensCount" is - https://pastebin.com/9M3Myidd
 

asoroka

Distinguished
Apr 19, 2009
46
0
18,610
correct, you need to make sure that all functions can be found.

You also have a problem where you are calling functions with the wrong type or number of parameters.
 
Solution

ExtreamChaozZ

Estimable
Dec 24, 2014
5
0
4,510
Cheers for your help, I look around online some more and found some patches that helps to reduce the scripts conflicting. After editing some bits as you suggested i managed to get it all working.

As fustrating as that was, i might have to invest some time into learning C++ properly as its quite satisfying getting a bunch of code you worked on to actually work.