Page MenuHomeFeedback Tracker

overriding function fails with "variable not found"
Closed, ResolvedPublic

Description

i tried to override a few functions in the mission, most of them worked except one:

override void OnClientDisconnectedEvent(PlayerIdentity identity, PlayerBase player, int queueTime, bool authFailed)
	{
		super.OnClientDisconnectedEvent(identity, player, queueTime, authFailed);
         }

it said it cannot find the variable "queueTime" in the super statement, even if it is supplied by the function.
the mission is extending missionBase.

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 10 x64
Operating System Version
2016 server
Category
Scripting
Steps To Reproduce
  1. create your own mission

class AMission: MissionServer {

override void OnClientDisconnectedEvent(PlayerIdentity identity, PlayerBase player, int queueTime, bool authFailed)

{

		super.OnClientDisconnectedEvent(identity, player, queueTime, authFailed);
         }

}

  1. run this code.
Additional Information

I suspect the problem is integer and bool after object class?

Event Timeline

g4borg created this task.Jan 24 2019, 6:47 PM
Geez changed the task status from New to Assigned.Jan 25 2019, 2:26 PM
Geez changed the task status from Assigned to Need More Info.Jan 25 2019, 2:43 PM
Geez added a subscriber: Geez.

Hello g4borg.
If you change the script to this

override void OnClientDisconnectedEvent(PlayerIdentity identity, PlayerBase player, int logoutTime, bool authFailed)

does the issue still occur?
Regards,
Geez

tested it.

this actually made it work.

what was the cause of this? the original function in missionServer uses different variable names, and i cannot find a local variable with the same name...

Geez closed this task as Resolved.Jan 30 2019, 10:45 AM
Geez claimed this task.

Hello g4borg.
The parameter name has been changed in the missionServer.c for the OnClientDisconnectedEvent function, therefore your own mission has to reflect that as well.
Regards,
Geez