Hi,
Got this problem during battlewaves game, it only happened once, but what it might be?
this msg came to chat:
runtime error: [modes/shootmania/battle.script.txt : 214, 60] called from: 96, 42] invalid access to parameter (null object or elem not found in array) : pendingevents[0].victim>.curretnclan
Restarting match...
im not sure if it happened after team captured last pole, but match was stopped and map restarted
Any help?
Runtime error
Moderator: English Moderator
- w1lla
- Posts: 2287
- Joined: 15 Jun 2010, 11:09
- Manialink: maniaplanetblog
- Location: Netherlands
- Contact:
Re: Runtime error
Hi,
it seems that the script the server is running on has a mistyped currentclan.
If its your own server it can be easily fixed:
change curretnclan with CurrentClan
it seems that the script the server is running on has a mistyped currentclan.
If its your own server it can be easily fixed:
change curretnclan with CurrentClan
TM² Info
SM Info
QM Info
OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
SM Info
QM Info
OS: Windows 10 x64 Professional
MB: MSI 970A-G46
Processor: AMD FX-6300 3500 mHz
RAM Memory: 16 GB DDR3
Video: SAPPHIRE DUAL-X R9 280X 3GB GDDR5
KB: Logitech G510s
Mouse: Logitech G300s
Mode Creation
ManiaScript Docs
Re: Runtime error
Sorry it was my typo
In origina error msg it was written 'current',
Could there be other solutions? When does this type error can happen, is it when showing results or specific amount of wins?

Could there be other solutions? When does this type error can happen, is it when showing results or specific amount of wins?
Re: Runtime error
if it would be the wrong written attribute the server wouldn't even start up 
".Victim>" shows that this attribute is Null, that's why you can't access its attribute .CurrentClan
there is obviously a logical error in the script, are you able to post it?

".Victim>" shows that this attribute is Null, that's why you can't access its attribute .CurrentClan
there is obviously a logical error in the script, are you able to post it?
Re: Runtime error
You mean whole script or parts?
This is in line 214:
} else if (UseClans && Event.Shooter.CurrentClan == Event.Victim.CurrentClan) {
Whole part near by 214:
/* -------------------------------------- */
// Play loop
/* -------------------------------------- */
***PlayLoop***
***
foreach (Event in PendingEvents) {
if (Event.Type == CSmModeEvent::EType::OnHit) {
if (Event.Shooter == Null || Event.Victim == Null || Event.Shooter == Event.Victim) {
Discard(Event);
} else if (UseClans && Event.Shooter.CurrentClan == Event.Victim.CurrentClan) {
Discard(Event);
} else {
if (Event.Damage > 0) {
Score::AddPoints(Event.Shooter, 1);
Top::IncrementPlayerPoints("Damages", Event.Shooter, 1);
}
PassOn(Event);
}
} else if (Event.Type == CSmModeEvent::EType::OnArmorEmpty) {
BalancedWeapons::OnOut(Event.Shooter, Event.Victim);
PassOn(Event);
} else if (Event.Type == CSmModeEvent::EType::OnCapture) {
LastestCapturedGoalId = Event.BlockPole.Id;
PassOn(Event);
} else{
PassOn(Event);
}
}
Line 96:
// Add Top 5
Top::AddTop("Capture", 5);
Top::AddTop("Damages", 5);
Whole part near by line 96:
// Set mode options
UseClans = True;
MB_UseSectionRound = True;
MB_UsePlayerClublinks = S_UsePlayerClublinks;
// Add Top 5
Top::AddTop("Capture", 5);
Top::AddTop("Damages", 5);
/* -------------------------------------- */
// Create layers
declare LayerTops <=> UIManager.UILayerCreate();
declare LayerRoundInfo <=> UIManager.UILayerCreate();
declare LayerTeams <=> UIManager.UILayerCreate();
declare LayerTeamsForSpectators <=> UIManager.UILayerCreate();
Interface::SetLayerTeams(LayerTeams);
Interface::SetLayerTeamsForSpectators(LayerTeamsForSpectators);
Script should be original and i havent changed it. Error came only one time and hasnt appeared in 30+ plays after
This is in line 214:
} else if (UseClans && Event.Shooter.CurrentClan == Event.Victim.CurrentClan) {
Whole part near by 214:
/* -------------------------------------- */
// Play loop
/* -------------------------------------- */
***PlayLoop***
***
foreach (Event in PendingEvents) {
if (Event.Type == CSmModeEvent::EType::OnHit) {
if (Event.Shooter == Null || Event.Victim == Null || Event.Shooter == Event.Victim) {
Discard(Event);
} else if (UseClans && Event.Shooter.CurrentClan == Event.Victim.CurrentClan) {
Discard(Event);
} else {
if (Event.Damage > 0) {
Score::AddPoints(Event.Shooter, 1);
Top::IncrementPlayerPoints("Damages", Event.Shooter, 1);
}
PassOn(Event);
}
} else if (Event.Type == CSmModeEvent::EType::OnArmorEmpty) {
BalancedWeapons::OnOut(Event.Shooter, Event.Victim);
PassOn(Event);
} else if (Event.Type == CSmModeEvent::EType::OnCapture) {
LastestCapturedGoalId = Event.BlockPole.Id;
PassOn(Event);
} else{
PassOn(Event);
}
}
Line 96:
// Add Top 5
Top::AddTop("Capture", 5);
Top::AddTop("Damages", 5);
Whole part near by line 96:
// Set mode options
UseClans = True;
MB_UseSectionRound = True;
MB_UsePlayerClublinks = S_UsePlayerClublinks;
// Add Top 5
Top::AddTop("Capture", 5);
Top::AddTop("Damages", 5);
/* -------------------------------------- */
// Create layers
declare LayerTops <=> UIManager.UILayerCreate();
declare LayerRoundInfo <=> UIManager.UILayerCreate();
declare LayerTeams <=> UIManager.UILayerCreate();
declare LayerTeamsForSpectators <=> UIManager.UILayerCreate();
Interface::SetLayerTeams(LayerTeams);
Interface::SetLayerTeamsForSpectators(LayerTeamsForSpectators);
Script should be original and i havent changed it. Error came only one time and hasnt appeared in 30+ plays after
Re: Runtime error
Use Code tags around your code, makes it much more readable.
Developer of XASECO for TMF/TMN ESWC & XASECO2 for TM²: see XAseco.org
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub
Find your way around the Mania community from the TMN ESWC hub, TMF hub, TM² hub, and SM hub
Re: Runtime error
thanks for posting the code!
but... actually... i'm... clueless...
i don't know how this could happen!
line 212 checks if the shooter attribute of the Event is null
and if this is not the case the game goes into line 214 and accesses the shooter object
that's why i have no idea why the game crashed in line 214 because the shooter object was null... it shouldn't try to access it after the check in line 212
anyone got an idea?
i also wonder why it says
does somebody know which line is meant by "96, 42"?
but... actually... i'm... clueless...
i don't know how this could happen!
line 212 checks if the shooter attribute of the Event is null
Code: Select all
if (Event.Shooter == Null || Event.Victim == Null || Event.Shooter == Event.Victim) {
Code: Select all
} else if (UseClans && Event.Shooter.CurrentClan == Event.Victim.CurrentClan) {

anyone got an idea?
i also wonder why it says
as the line 96 has nothing to do with the event (in none of battlewaves, battle and modebase scripts)called from: 96, 42
does somebody know which line is meant by "96, 42"?
Who is online
Users browsing this forum: No registered users and 1 guest