ETMods.net

N!tmod, a Wolfenstein: Enemy Territory Modification!

You are not logged in.

Announcement

You can donate to help us keeping services online.

#1 29-Apr-21 16:02:59

surfzoid
Member
Registered: 29-Apr-21
Posts: 4

quit.menu add extra %20 at the end of the url

Hi, on our server we have an x_nitmod_skin_tiw45.pk3 with inside ui/quit.menu the code display quit message with an button to open our web site, but when the browser is open, there is an extra %20 at the end of the url, is there an workaround ?

#include "ui/menudef.h"

// Defines //

#define WINDOW_X		0
#define WINDOW_Y		0
#define WINDOW_WIDTH	640
#define WINDOW_HEIGHT	480
#define GROUP_NAME		"grpQuit"

// Macros //

#include "ui/menumacros.h"
		
// Quit Menu //
	
menuDef {
	name		"quit"
	visible		0
	fullscreen	0
	rect		WINDOW_X WINDOW_Y WINDOW_WIDTH WINDOW_HEIGHT
	style		WINDOW_STYLE_FILLED
	popup
	
	fadeClamp	0.5
	fadeAmount  0.075
	
	onOpen {
		setitemcolor background backcolor 0 0 0 0 ;
		fadein background
		exec "set ui_finalURL https://tiwbythebest34.forumgaming.fr/"
	}
	
	onESC {
		close quit ;
#ifdef FUI
		open main
#else
		open ingame_main
#endif // FUI
	}
	
// Background //

	itemDef {
		name		"background"
		rect		0 0 640 480
		style		WINDOW_STYLE_FILLED
		background	"ui/assets/fadebox.tga"
		backcolor	0 0 0 0
		visible		1
		decoration
	}

// Subwindows //

#define SUBWINDOW_WIDTH		192
#define SUBWINDOW_HEIGHT	80
#define SUBWINDOW_X			.5*(WINDOW_WIDTH-SUBWINDOW_WIDTH)
#define SUBWINDOW_Y			.5*(WINDOW_HEIGHT-SUBWINDOW_HEIGHT)

	SUBWINDOWBLACK( SUBWINDOW_X, SUBWINDOW_Y, SUBWINDOW_WIDTH, SUBWINDOW_HEIGHT, "EXIT GAME?" )
	LABEL( SUBWINDOW_X+2, SUBWINDOW_Y+21, (SUBWINDOW_WIDTH)-4, 10, "Don't forget to check out", .2, ITEM_ALIGN_CENTER, .5*((SUBWINDOW_WIDTH)-4), 8 )
	LABEL( SUBWINDOW_X+2, SUBWINDOW_Y+33, (SUBWINDOW_WIDTH)-4, 10, "our website!!!", .2, ITEM_ALIGN_CENTER, .5*((SUBWINDOW_WIDTH)-4), 8 )
	
#ifdef FUI
	BUTTON( 236, 256, 50, 18, "YES", .3, 14, close quit ; close main ; open credits_quit)
	BUTTON( 356, 256, 50, 18, "NO", .3, 14, close quit ; open main )
	BUTTON( 296, 256, 50, 18, "^7{^2T^3i^1W^7}", .3, 14, close quit ; close main ; open credits_quit ; uiScript validate_openURL)
#else
	BUTTON( 236, 256, 50, 18, "YES", .3, 14, close quit ; close ingame_main ; open credits_quit)
	BUTTON( 356, 256, 50, 18, "NO", .3, 14, close quit ; open ingame_main )
	BUTTON( 296, 256, 50, 18, "^7{^2T^3i^1W^7}", .3, 14, close quit ; close ingame_main ; open credits_quit ; uiScript validate_openURL)
#endif // FUI

}

Last edited by surfzoid (29-Apr-21 16:03:45)

Offline

#2 30-Apr-21 08:04:42

mazak
Member
From: Poland
Registered: 11-Jun-13
Posts: 37

Re: quit.menu add extra %20 at the end of the url

Could you explain what exactly is going on?
Works fine for me:
hYo91Rw.png


45868182.jpg
560x95_FFFFFF_FF9900_000000_000000.png

Offline

#3 30-Apr-21 10:30:10

surfzoid
Member
Registered: 29-Apr-21
Posts: 4

Re: quit.menu add extra %20 at the end of the url

Hi
if you copy/paste the url from the script, yes it work.
if you connect to our serveur gerardmauricemothe.ovh:27960 or 51.68.44.185:27960 and pres escape, then click disconnect, the script "quit.menu" is called and display an popup with 3 button, clic on the "tiw" button close the game and open the website but, whit an extra %20 at the and, if you wait few second, the web server correct it automatically and redirect to the home page.

the UI dll code, I don't know but just a thought that the UI script parser could be adding it

Last edited by surfzoid (30-Apr-21 10:32:21)

Offline

#4 30-Apr-21 12:04:56

mazak
Member
From: Poland
Registered: 11-Jun-13
Posts: 37

Re: quit.menu add extra %20 at the end of the url

This doesn't work with the disconnect option:
tOOuslb.jpg
When you press the button exit game:
DTYklKh.jpg
It takes me to the page correctly as shown above

To make it work on the disconnect options. You need to edit the disconnect.menu file

Last edited by mazak (30-Apr-21 12:31:17)


45868182.jpg
560x95_FFFFFF_FF9900_000000_000000.png

Offline

#5 30-Apr-21 12:48:39

surfzoid
Member
Registered: 29-Apr-21
Posts: 4

Re: quit.menu add extra %20 at the end of the url

sorry my mistake not disconnect, but quit yes, on my pc it add the extra %20
server is linux legacy 2.77
Client is linux 2.76

I will ask to other player of the team is they have the extra %20

Offline

#6 30-Apr-21 21:45:55

N!trox*
Administrator
Registered: 30-Mar-10
Posts: 1,098

Re: quit.menu add extra %20 at the end of the url

Try removing the / at the end of the URL in your menu script.


iluvnitmod.png

Offline

Board footer

Powered by FluxBB