[Solved]Server Adds on NexgenPlus

Discussions about Coding and Scripting
Letylove49
Experienced
Posts: 132
Joined: Tue Feb 28, 2012 7:47 pm
Personal rank: <[MHA]> /UK Admin
Location: suisse

[Solved]Server Adds on NexgenPlus

Post by Letylove49 » Wed Sep 14, 2022 10:36 pm


Error in NXPClientcore.uc (149): Bad or missing expression after '!'

Code: Select all

 /***************************************************************************************************
 *
 *  $DESCRIPTION  Updates the server advert settings
 *  $PARAM        timeInterval  Number of seconds between each show of an advert
 *  $PARAM        bRandomOrder  TRUE if adverts should be picked from the list at random
 *
 **************************************************************************************************/
function updateServerAdvertSettings (byte timeInterval, bool bRandomOrder) {

     [color=#FF0000]if (!client.hasRight(client.R_ServerAdmin))[/color]
	   return;

    if (timeInterval >= 1)
        control.sConf.advertTimeInterval = timeInterval;
    else
   	    client.showMsg(control.lng.saInvTimeMsg);

    control.sConf.bRandomAdvertOrder = bRandomOrder;

	// Save changes.
	control.sConf.saveConfig();

	

    // Signal update.
   	control.signalConfigUpdate(control.sConf.CT_AdvertSettings);

       client.showMsg(control.lng.settingsSavedMsg);
} 
I do not understand why when i use the sane code on Nexgen113 that work and not when i put it on a plugin

can someone explain to me why please.
Last edited by Letylove49 on Sun Sep 18, 2022 9:12 pm, edited 1 time in total.
<[MHA]>Letylove49 aka Shado170

User avatar
Barbie
Godlike
Posts: 2423
Joined: Fri Sep 25, 2015 9:01 pm
Location: moved without proper hashing

Re: Server Adds on NexgenPlus

Post by Barbie » Thu Sep 15, 2022 11:02 am

Sadly the color tag does not work in code blocks. ;)
What is obvious for me here is that one ore more of these are not known
  • object client
  • function client.hasRight()
  • property client.R_ServerAdmin
To say more I need relevant parts of the class definition as well as the content of make.ini.
"Multiple exclamation marks," he went on, shaking his head, "are a sure sign of a diseased mind." --Terry Pratchett

Buggie
Godlike
Posts: 1652
Joined: Sat Mar 21, 2020 5:32 am

Re: Server Adds on NexgenPlus

Post by Buggie » Thu Sep 15, 2022 11:20 am

Barbie wrote:
Thu Sep 15, 2022 11:02 am
property client.R_ServerAdmin
Cannot be case. If be such say smth about wrong parameter to hasRight.

Log: Error in AddBotNotify, Line 9: Bad or missing expression after '!'
Such possible only if object not know.

So reason - client is unknown thing at class where error.
Barbie wrote:
Thu Sep 15, 2022 11:02 am
function client.hasRight()
This produce:
Log: Error in AddBotNotify, Line 9: Unrecognized member 'Size' in class 'Actor'

Letylove49
Experienced
Posts: 132
Joined: Tue Feb 28, 2012 7:47 pm
Personal rank: <[MHA]> /UK Admin
Location: suisse

Re: Server Adds on NexgenPlus

Post by Letylove49 » Thu Sep 15, 2022 1:01 pm

Barbie wrote:
Thu Sep 15, 2022 11:02 am
Sadly the color tag does not work in code blocks. ;)
What is obvious for me here is that one ore more of these are not known
  • object client
  • function client.hasRight()
  • property client.R_ServerAdmin
To say more I need relevant parts of the class definition as well as the content of make.ini.
here the full log of the compilation :

Code: Select all


Log: Bound to Editor.dll
Log: Bound to Engine.dll
Log: Bound to Window.dll
Log: Executing Class Editor.MakeCommandlet
Init: Unreal engine initialized
Heading: --------------------Core--------------------
Heading: --------------------Engine--------------------
Heading: --------------------Editor--------------------
Heading: --------------------UWindow--------------------
Heading: --------------------Fire--------------------
Log: Bound to Fire.dll
Heading: --------------------IpDrv--------------------
Log: Bound to IpDrv.dll
Heading: --------------------UWeb--------------------
Log: Bound to UWeb.dll
Heading: --------------------UBrowser--------------------
Heading: --------------------UnrealShare--------------------
Heading: --------------------UnrealI--------------------
Heading: --------------------UMenu--------------------
Heading: --------------------IpServer--------------------
Heading: --------------------Botpack--------------------
Heading: --------------------UTServerAdmin--------------------
Heading: --------------------UTMenu--------------------
Heading: --------------------UTBrowser--------------------
Heading: --------------------NexgenCC--------------------
Heading: --------------------Nexgen113--------------------
Heading: --------------------Nexgenplus101--------------------
Warning: Failed to load 'Nexgenplus101.u': Can't find file 'Nexgenplus101.u'
Warning: Failed loading package: Can't find file 'Nexgenplus101.u'
Log: Analyzing...
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPAutoRedirectDialog.uc)
Log: Imported: Class Nexgenplus101.NXPAutoRedirectDialog
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPClient.uc)
Log: Imported: Class Nexgenplus101.NXPClient
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPClientConfigRCP.uc)
Log: Imported: Class Nexgenplus101.NXPClientConfigRCP
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPClientcore.uc)
Log: Imported: Class Nexgenplus101.NXPClientcore
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPConfig.uc)
Log: Imported: Class Nexgenplus101.NXPConfig
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPConfigDC.uc)
Log: Imported: Class Nexgenplus101.NXPConfigDC
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPConfigExt.uc)
Log: Imported: Class Nexgenplus101.NXPConfigExt
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPConfigSys.uc)
Log: Imported: Class Nexgenplus101.NXPConfigSys
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPHUD.uc)
Log: Imported: Class Nexgenplus101.NXPHUD
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPLang.uc)
Log: Imported: Class Nexgenplus101.NXPLang
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPMain.uc)
Log: Imported: Class Nexgenplus101.NXPMain
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPMapListDC.uc)
Log: Imported: Class Nexgenplus101.NXPMapListDC
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPMapSwitchRCP.uc)
Log: Imported: Class Nexgenplus101.NXPMapSwitchRCP
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPMatchControlRCP.uc)
Log: Imported: Class Nexgenplus101.NXPMatchControlRCP
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPPlayerOverlay.uc)
Log: Imported: Class Nexgenplus101.NXPPlayerOverlay
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPServerAddsRCP.uc)
Log: Imported: Class Nexgenplus101.NXPServerAddsRCP
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPServerFullDialog.uc)
Log: Imported: Class Nexgenplus101.NXPServerFullDialog
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPServerRedirectRCP.uc)
Log: Imported: Class Nexgenplus101.NXPServerRedirectRCP
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPServerRulesOverviewRCP.uc)
Log: Imported: Class Nexgenplus101.NXPServerRulesOverviewRCP
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPServerRulesRCP.uc)
Log: Imported: Class Nexgenplus101.NXPServerRulesRCP
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPSettingsRCP.uc)
Log: Imported: Class Nexgenplus101.NXPSettingsRCP
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPTagProtectionRCP.uc)
Log: Imported: Class Nexgenplus101.NXPTagProtectionRCP
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPTagRejectDialog.uc)
Log: Imported: Class Nexgenplus101.NXPTagRejectDialog
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPUpdateCheckWR.uc)
Log: Imported: Class Nexgenplus101.NXPUpdateCheckWR
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPUpdateNotificationDialog.uc)
Log: Imported: Class Nexgenplus101.NXPUpdateNotificationDialog
Log: FactoryCreateText: Class with ClassFactoryUC (0 1 ..\Nexgenplus101\Classes\NXPUtil.uc)
Log: Imported: Class Nexgenplus101.NXPUtil
DevCompile: DowngradeClasses:
DevCompile:    Uncompiled: UMenuHelpMenu
DevCompile:    Uncompiled: NXPAutoRedirectDialog
DevCompile:    Uncompiled: NXPClient
DevCompile:    Uncompiled: NXPClientConfigRCP
DevCompile:    Uncompiled: NXPClientcore
DevCompile:    Uncompiled: NXPConfig
DevCompile:    Uncompiled: NXPConfigDC
DevCompile:    Uncompiled: NXPConfigExt
DevCompile:    Uncompiled: NXPConfigSys
DevCompile:    Uncompiled: NXPHUD
DevCompile:    Uncompiled: NXPLang
DevCompile:    Uncompiled: NXPMain
DevCompile:    Uncompiled: NXPMapListDC
DevCompile:    Uncompiled: NXPMapSwitchRCP
DevCompile:    Uncompiled: NXPMatchControlRCP
DevCompile:    Uncompiled: NXPPlayerOverlay
DevCompile:    Uncompiled: NXPServerAddsRCP
DevCompile:    Uncompiled: NXPServerFullDialog
DevCompile:    Uncompiled: NXPServerRedirectRCP
DevCompile:    Uncompiled: NXPServerRulesOverviewRCP
DevCompile:    Uncompiled: NXPServerRulesRCP
DevCompile:    Uncompiled: NXPSettingsRCP
DevCompile:    Uncompiled: NXPTagProtectionRCP
DevCompile:    Uncompiled: NXPTagRejectDialog
DevCompile:    Uncompiled: NXPUpdateCheckWR
DevCompile:    Uncompiled: NXPUpdateNotificationDialog
DevCompile:    Uncompiled: NXPUtil
DevCompile:    Parent unparsed: NXPConfigExt
DevCompile:    Parent unparsed: NXPConfigSys
DevCompile:    Uncompiled due to dependency on UMenuHelpMenu: UMenuMenuBar
Log: Parsing NXPClient
Log: FactoryCreateBinary: Sound with SoundFactory (0 0 Resources\alertSound.wav)
Log: FactoryCreateBinary: Sound with SoundFactory (0 0 Resources\GoodLuckWarrior.wav)
Log: Parsing NXPConfigDC
Log: Parsing NXPMapListDC
Log: Parsing NXPClientcore
Log: Parsing NXPMain
Log: Parsing NXPUpdateCheckWR
Log: Parsing NXPConfig
Log: Parsing NXPConfigExt
Log: Parsing NXPConfigSys
Log: Parsing NXPLang
Log: Parsing NXPPlayerOverlay
Log: FactoryCreateBinary: Texture with TextureFactory (0 0 Resources\OverlaySkinRed.pcx)
Log: Imported Texture Nexgenplus101.GFX.OverlaySkinRed
Log: FactoryCreateBinary: Texture with TextureFactory (0 0 Resources\OverlaySkinBlue.pcx)
Log: Replaced palette Palette3 with Palette1
Log: Imported Texture Nexgenplus101.GFX.OverlaySkinBlue
Log: FactoryCreateBinary: Texture with TextureFactory (0 0 Resources\OverlaySkinGreen.pcx)
Log: Replaced palette Palette5 with Palette1
Log: Imported Texture Nexgenplus101.GFX.OverlaySkinGreen
Log: FactoryCreateBinary: Texture with TextureFactory (0 0 Resources\OverlaySkinGold.pcx)
Log: Replaced palette Palette7 with Palette1
Log: Imported Texture Nexgenplus101.GFX.OverlaySkinGold
Log: FactoryCreateBinary: Texture with TextureFactory (0 0 Resources\OverlaySkinSilver.pcx)
Log: Replaced palette Palette9 with Palette1
Log: Imported Texture Nexgenplus101.GFX.OverlaySkinSilver
Log: FactoryCreateBinary: Texture with TextureFactory (0 0 Resources\OverlaySkinARed.pcx)
Log: Imported Texture Nexgenplus101.GFX.OverlaySkinARed
Log: FactoryCreateBinary: Texture with TextureFactory (0 0 Resources\OverlaySkinABlue.pcx)
Log: Imported Texture Nexgenplus101.GFX.OverlaySkinABlue
Log: FactoryCreateBinary: Texture with TextureFactory (0 0 Resources\OverlaySkinAGreen.pcx)
Log: Imported Texture Nexgenplus101.GFX.OverlaySkinAGreen
Log: FactoryCreateBinary: Texture with TextureFactory (0 0 Resources\OverlaySkinAGold.pcx)
Log: Imported Texture Nexgenplus101.GFX.OverlaySkinAGold
Log: FactoryCreateBinary: Texture with TextureFactory (0 0 Resources\OverlaySkinASilver.pcx)
Log: Imported Texture Nexgenplus101.GFX.OverlaySkinASilver
Log: Parsing NXPHUD
Log: FactoryCreateBinary: Texture with TextureFactory (0 0 Resources\PingBox.pcx)
Log: Imported Texture Nexgenplus101.GFX.pingBox
Log: FactoryCreateBinary: Texture with TextureFactory (0 0 Resources\TimeBox.pcx)
Log: Imported Texture Nexgenplus101.GFX.timeBox
Log: FactoryCreateBinary: Texture with TextureFactory (0 0 Resources\windowBG.pcx)
Log: Imported Texture Nexgenplus101.GFX.windowBG
Log: Parsing UMenuHelpMenu
Log: Parsing NXPMatchControlRCP
Log: Parsing NXPClientConfigRCP
Log: Parsing NXPMapSwitchRCP
Log: Parsing NXPServerAddsRCP
Log: Parsing NXPServerRedirectRCP
Log: Parsing NXPServerRulesOverviewRCP
Log: Parsing NXPServerRulesRCP
Log: Parsing NXPSettingsRCP
Log: Parsing NXPTagProtectionRCP
Log: Parsing NXPAutoRedirectDialog
Log: Parsing NXPServerFullDialog
Log: Parsing NXPTagRejectDialog
Log: Parsing NXPUpdateNotificationDialog
Log: Parsing NXPUtil
Log: Compiling NXPClient
Log: Compiling NXPConfigDC
Log: Compiling NXPMapListDC
Log: Compiling NXPClientcore
Error: C:\UT coding\UnrealTournament\Nexgenplus101\Classes\NXPClientcore.uc(149) : Error, Bad or missing expression after '!'
Critical: appError called:
Critical: Failed due to errors.
Exit: Executing UObject::StaticShutdownAfterError
Critical: CompileError
Critical: TryCompile
Critical: FScriptCompiler::CompileScript
Critical: (Class Nexgenplus101.NXPClientcore, Pass 1, Line 149)
Critical: CompileScripts
Critical: CompileScripts
Critical: CompileScripts
Critical: CompileScripts
Critical: CompileScripts
Critical: CompileScripts
Critical: DoScripts
Critical: UEditorEngine::MakeScripts
Critical: UMakeCommandlet::Main
Exit: Exiting.
Uninitialized: Name subsystem shut down
Uninitialized: Log file closed, 09/14/22 23:29:36 

 

Automatically merged

Barbie wrote:
Thu Sep 15, 2022 11:02 am
Sadly the color tag does not work in code blocks. ;)
What is obvious for me here is that one ore more of these are not known
  • object client
  • function client.hasRight()
  • property client.R_ServerAdmin
To say more I need relevant parts of the class definition as well as the content of make.ini.
this fonction are on Nexgen113 Package.

Pehaps i use the wrong dependencie ?

Code: Select all

 class NXPClientCore extends NexgenCorePlugin;
<[MHA]>Letylove49 aka Shado170

Buggie
Godlike
Posts: 1652
Joined: Sat Mar 21, 2020 5:32 am

Re: Server Adds on NexgenPlus

Post by Buggie » Thu Sep 15, 2022 1:28 pm

No. In class where you try use it, field "client" not defined. In exactly used class or any parent of it.

Letylove49
Experienced
Posts: 132
Joined: Tue Feb 28, 2012 7:47 pm
Personal rank: <[MHA]> /UK Admin
Location: suisse

Re: Server Adds on NexgenPlus

Post by Letylove49 » Thu Sep 15, 2022 4:35 pm

----- Core
----- Engine
----- Editor
----- UWindow
----- Fire
----- IpDrv
----- UWeb
----- UBrowser
----- UnrealShare
----- UnrealI
----- UMenu
----- IpServer
----- Botpack
----- UTServerAdmin
----- UTMenu
----- UTBrowser
----- NexgenCC
----- Nexgen113
----- Nexgenplus101
Analyzing...
Parsing NXPClient
Parsing NXPConfigDC
Parsing NXPMapListDC
Parsing NXPClientcore
Parsing NXPMain
Parsing NXPUpdateCheckWR
Parsing NXPConfig
Parsing NXPConfigExt
Parsing NXPConfigSys
Parsing NXPLang
Parsing NXPPlayerOverlay
Parsing NXPHUD
Parsing UMenuHelpMenu
Parsing NXPMatchControlRCP
Parsing NXPClientConfigRCP
Parsing NXPMapSwitchRCP
Parsing NXPServerAddsRCP
Parsing NXPServerRedirectRCP
Parsing NXPServerRulesOverviewRCP
Parsing NXPServerRulesRCP
Parsing NXPSettingsRCP
Parsing NXPTagProtectionRCP
Parsing NXPAutoRedirectDialog
Parsing NXPServerFullDialog
Parsing NXPTagRejectDialog
Parsing NXPUpdateNotificationDialog
Parsing NXPUtil
Compiling NXPClient
Compiling NXPConfigDC
Compiling NXPMapListDC
Compiling NXPClientcore
Error in NXPClientcore.uc (158): Unrecognized member 'advertTimeInterval' in class 'NexgenConfig'

Code: Select all

/***************************************************************************************************
 *
 *  $DESCRIPTION  Updates the server advert settings
 *  $PARAM        timeInterval  Number of seconds between each show of an advert
 *  $PARAM        bRandomOrder  TRUE if adverts should be picked from the list at random
 *
 **************************************************************************************************/
function updateServerAdvertSettings (byte timeInterval, bool bRandomOrder) {
local NexgenClient client;
local NXPConfig byte;



	if (!client.hasRight(client.R_ServerAdmin))  
	   return;

    if (timeInterval >= 1)
        control.sConf.advertTimeInterval = timeInterval;
    else
   	    client.showMsg(control.lng.saInvTimeMsg);

    control.sConf.bRandomAdvertOrder = bRandomOrder;

	// Save changes.
	control.sConf.saveConfig();

	

    // Signal update.
   	control.signalConfigUpdate(control.sConf.CT_AdvertSettings);

       client.showMsg(control.lng.settingsSavedMsg);
} 
i'm tring to say to the compiler to get NXPConfig instead NexgenConfig were the advertimeinterval is definied because this variable is not on NexgenConfig but on NXPConfig.

how i can say to the compiler to take the class NXPConfig ???
<[MHA]>Letylove49 aka Shado170

Letylove49
Experienced
Posts: 132
Joined: Tue Feb 28, 2012 7:47 pm
Personal rank: <[MHA]> /UK Admin
Location: suisse

Re: Server Adds on NexgenPlus

Post by Letylove49 » Sun Sep 18, 2022 9:12 pm

the solution was

Code: Select all

local NexgenClient client;
local NXPConfig sConf;

  spawn (class'NXPConfig', self); 
<[MHA]>Letylove49 aka Shado170