Welcome Guest [Log In] [Register]
Welcome to NHL04 Rebuilt 2017. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
Edit Lines Error; Custom Team missing from Dropdownmenu
Topic Started: May 16 2015, 04:11 AM (464 Views)
NemeSiS77
Rookie
Hi Guys,
with a fresh Windows Installation, I decided to switch to the full mod and I have to say, great work, it's awesome!!

My brother and I are mainly playing with custom teams, and after I installed the mod, I also imported all necessary files to play with these teams. (Jerseys, Logos etc.)
Play Now works fine, and also when I simulated a complete DEL Season with all but custom teams, it worked also just fine right to the championship.

But when I looked to the Edit Lines screen, I got a Script Error (http://imgur.com/aJxjqzR).

So I tried to look into this a bit, and found out, that when I start a new season with only 1 Custom Team, i get no error, but the custom team disappeared from the Dropdown list.
There are these swap-buttons, where I can switch between home and away team but even then I can't get to the custom team.
The interesting thing is, this only happens on Euro Leagues (DEL, Liiga, Elitserien), when I do this with a NHL-Season it works fine and I can select my team.

All other things from the Coaches Room like strategies, injuries are no problem.

While I could edit lines via NHLview, I would prefer the ingame screen (much more comfortable).

So hopefully, somebody has an idea to fix this issue.

Thanks in advance,
Chris
Offline Profile Quote Post Goto Top
 
Vod
Member Avatar
Development Team
Can you please translate that error message to English?
NHL 2004 Launcher | My Changelog | NHL 2004 Preservation | NHL 2004 Debugger
Online Profile Quote Post Goto Top
 
NemeSiS77
Rookie
Hi,
thanks for the reply.

Of course, didn't think about that ;)

First Line simply states the fact that an error occured in a script on that page.
Line: 1126
Character(?): 2
Error: Type conflict
Code: 0
URL links to the scriptfile.

Then the question "Do you want to continue running scripts on this page?"


Chris
Offline Profile Quote Post Goto Top
 
Sence
Hall of Famer
NemeSiS77,16 May 2015
8:26 AM
Hi,
thanks for the reply.

Of course, didn't think about that ;)

First Line simply states the fact that an error occured in a script on that page.
Line: 1126
Character(?): 2
Error: Type conflict
Code: 0
URL links to the scriptfile.

Then the question "Do you want to continue running scripts on this page?"


Chris

So you have checked that it happens also with Liiga? First thing what I was thinking about is that there might be some language problem. But this is custom team problem especially when you see that it isn't in the dropdown list. Code cannot work properly because modified editline window uses dropdown list to perform different features.

So.. So you modified the database to import those already created custom teams?
A video is worth of thousand pictures.

http://www.youtube.com/watch?v=bFq2dGSVdOI
My Sharks 2015-16 season (finished)
Offline Profile Quote Post Goto Top
 
NemeSiS77
Rookie
No, after installing the game, updating to the mod I made sure everything works.
Then I edited the roster with Nhlview to create the custom teams, set all the data for these teams based on my old roster, and transfered/copied the players for each team.
Did this many times with my old installation, and it worked quite good, just had to change minor things because I didn't had the full rebuilt mod.

Then I imported jerseys (uni1xx.viv), Team-Logos (Logo_sml_xxx.fsh, Interface-Logos etc.) to the game so I could play with these teams without any errors or crashes. (again, worked)

Then I started a new DEL season and replaced all 14 Teams with 14 of my custom teams, simulated the whole season until the end of playoffs and everything worked without errors.

Then I wanted to look at the lines (to see what changes where made because of injuries).
When the screen popped up, I got the script error.

Then I started another DEL season, this time only with 1 custom team replacing a standard DEL-Team.
This time, I had no script errors, but my team wasn't in the dropdownlist.
(Maybe because all 14 teams where removed and the list empty resulted in the script error)
After that I started new seasons for the other leagues, and only with NHL I got the correct line screen.

Hope that clarifies the problem a bit,
Chris
Offline Profile Quote Post Goto Top
 
Sence
Hall of Famer
Thanks! No I got the whole picure! :)

In the line 1126, there this piece of code
Code:
 
cell_111.rosterId = oGameManager.LineEntry(aTeam[drpTeam.Selected*2],1,1,1);


I haven't done any custom teams in my life so, I'm not an expert. That is why I hope that modders who have done teams and faced this kind of problems can solve this. Anyway, That piece of code needs all dropdown teams. Error comes when you try to open custom team roster in editlines. If there is other teams which are not custom and if you you control multiple teams, then I think so that game opens them autimatically to a view. That is why you won't get error. But when you tried with just custom teams, there is nothing in dropdown list.

Dropdown list takes the name of the teams in line 833 and in the line 828 teams of the leagues are imported.

I missed this spot and I'm sorry if I misunderstood, but did you install the whole main rebuilt interface? Or are you using the old one or something else?

A video is worth of thousand pictures.

http://www.youtube.com/watch?v=bFq2dGSVdOI
My Sharks 2015-16 season (finished)
Offline Profile Quote Post Goto Top
 
NemeSiS77
Rookie
I installed the complete rebuilt interface, and only added or replaced some gifs (some of logo100-149.gif, pog, mini etc.), arena loadscreens for 91 and 99 (which shows on custom team home games) and own clocks.

When the custom team is user controlled and there is a game scheduled, I can swap home/away, but my team is replaced by the first team in the dropdown menu.

Since the other screens are working fine, I looked at the coaching_strategies_interface.js, here I can select my team.
The code for the function looks similar but different. Line 626-643.
Code:
 

function changeLeague()
{
aTeams = new Array();
aTeamIds = new Array();
aTeams = oGameData.GetLeagueTeamList( drpLeague.Selected ).split(',');
drpTeam.ClearAll();

for (var i=1; i<aTeams.length; i+=2)
{
 drpTeam.addString(aTeams[i]);
 // Store the proper teamIds since the index isn't really the teamId
 aTeamIds[(i-1)/2]=aTeams[i-1];
}

drpTeam.Selected = 0;
changeTeam();
}

But I have no idea if this is really the function that is called when selecting a team / league in strategies.
Offline Profile Quote Post Goto Top
 
Sence
Hall of Famer
Yes it is different. In Coach menu you can see only the teams which are under your control in the dropdown, but in the editlines you can see all teams. Hmm.. I know that it is close, but so far I cannot check the thing properly because I'm out of time. :( Maybe on next week, if you still have the same problem I can try to solve it. :)
A video is worth of thousand pictures.

http://www.youtube.com/watch?v=bFq2dGSVdOI
My Sharks 2015-16 season (finished)
Offline Profile Quote Post Goto Top
 
NemeSiS77
Rookie
If you could take the time to take a closer look would be great and is much appreciated.

And this isn't a gamebreaking bug, since I can play the game, edit lines in non-season mode or NHLView, and the next season doesn't start until September :D

I'm no java-programmer but know a little bit about vba/vb.net, so I think I will also take a look at these codes and see if I can find something.
Offline Profile Quote Post Goto Top
 
Sence
Hall of Famer
NemeSiS77,16 May 2015
7:04 PM
If you could take the time to take a closer look would be great and is much appreciated.

And this isn't a gamebreaking bug, since I can play the game, edit lines in non-season mode or NHLView, and the next season doesn't start until September :D

I'm no java-programmer but know a little bit about vba/vb.net, so I think I will also take a look at these codes and see if I can find something.

No problem! You should also check what is different in your custom teams and rebuilt teams. Those are custom also. Because still it is working properly with those teams, so there has to be something in your custom teams. At least it is most likely the reason of this behavior. Name of the teams has forbidden characters or something. Also same thing with players. Just checking! :)

It is a javascript and it quite far for Java. :) So if you need some instructions from web check Javascript instead of Java.
A video is worth of thousand pictures.

http://www.youtube.com/watch?v=bFq2dGSVdOI
My Sharks 2015-16 season (finished)
Offline Profile Quote Post Goto Top
 
NemeSiS77
Rookie
I did some investigating, and I think the root cause comes from the function "initInterface".

Starting in line 1279, the script checks if it is an exhibition game or not.
(If yes, then you can use the cycler (home/away-swapbutton) to switch between home and away team, if it is a league game, you can swap for home/away of the next selected game in the schedule)

But there is also a comment line, 1286:
Code:
 
//aTeam = oGameManager.GetManageableTeamList().split(',');

This is also in the original EA script, and if i reenable this code together with line 1304 and go to edit lines, then there is the user controlled team in the screen, with roster and all! Depending on how many teams are user controlled, the drpTeam menu shows all these teams, up to the max (14 for DEL).

Using the cycler-buttons will mess this up again, switching to 2 teams and removing the custom teams from the dropdown, plus it changes the behaviour of the dropdown-menu:
http://imgur.com/NIB0b3N

But this change will also break the "play now edit lines, the cycler always goes back to NHL/Anaheim.

I think I will look further into this tomorrow, now it's getting a bit late ;)
Offline Profile Quote Post Goto Top
 
NemeSiS77
Rookie
I found out that line 1286 is not needed, I guess I was a bit confused because I'm not familiar with If-then-else in JS. (Where is the "END IF"? :D)

I changed line 1303 to comment and added this line instead:
Code:
 

aTeam = oGameManager.GetManageableTeamList().split(',');



That lets me select all Usercontrolled Teams in the Dropdown-List, Custom Teams inclusive.
(Similar to the team strategy page)

Then I tried to look for a fix for the problem with the cycler.
I changed function "HoAwTeamSelect" and added an else-block:
Code:
 

function HoAwTeamSelect(){
var team = oCyclerHomeAway.value;
if (leagueType <= leagueTypeExhibitionMatchup) {
{
if (team == isHome)
 drpLeague.Selected = oGameData.HomeLeague;
  else
 drpLeague.Selected = oGameData.AwayLeague;
}
   aTeam = oGameData.GetLeagueTeamList( drpLeague.Selected ).split(',');
}else {
   aTeam = oGameManager.GetManageableTeamList().split(',');
}    
drpTeam.ClearAll();
for (var i=1; i<aTeam.length; i+=2)
drpTeam.addString(aTeam[i]);
if (team == isHome)
drpTeam.Selected = IDHomeTeam
else
drpTeam.Selected = IDAwayTeam
bLoading = false;
changeTeam();
hideDialog();



With this change, I can correctly cycle between Home/Away team (depending on the selected game in the schedule), but only if all teams are usercontrolled. If one or more are not, then it shows weird results, switching to teams that play at home or away, but not against each other.
Another test with 2 teams, 1 plays at home, that game is selected, the other team plays away in different game. Using the cycler has no effect, since it goes back to the home team.
If I select the game with the away team, and press the cycler 1 time, then it stays the away team, but at the 2nd click it switches to the 1st usercontrolled team that plays the homegame.

So the problem seems to lie either in lines 2480-2483
Code:
 

if (team == isHome)
       drpTeam.Selected = IDHomeTeam
else
       drpTeam.Selected = IDAwayTeam



or within function "changeTeam",
Code:
 

   if (drpTeam.Selected == IDHomeTeam)
      oCyclerHomeAway.setOptionByValue(isHome);
    else if (drpTeam.Selected == IDAwayTeam)
      oCyclerHomeAway.setOptionByValue(isAway);
    else
      oCyclerHomeAway.setText(sNonHomeAway);


Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Problem Reports / Tech Support · Next Topic »
Add Reply