[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - MenuQC Help Needed

MenuQC Help Needed

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

MenuQC Help Needed

Postby MauveBib » Fri Jun 07, 2013 11:34 am

Hey all, long time no see!

I'm working on a big project at the moment, and it's one that really needs menuqc.

Does anyone have any (working) links to any mods with sample menuqc I can take a look at? Other than Nexuiz/Whateverit'scallednow and the non-working DPMod code?

Cheers
Apathy Now!
User avatar
MauveBib
 
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am

Re: MenuQC Help Needed

Postby MauveBib » Fri Jun 07, 2013 2:35 pm

More specifically, I need help with getting a working server browser, and text input boxes (for things like player name).
Apathy Now!
User avatar
MauveBib
 
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am

Re: MenuQC Help Needed

Postby Spike » Fri Jun 07, 2013 3:15 pm

.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: MenuQC Help Needed

Postby Baker » Fri Jun 07, 2013 5:37 pm

:!: It has been a long time.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: MenuQC Help Needed

Postby MauveBib » Fri Jun 07, 2013 6:10 pm

Thanks a lot, that's really helpful.

I'm having a bit of difficulty pulling through "gamedir"; the check for the correct gamedir isn't working and when I try to display it it's blank... Likewise I'm struggling to pull the server address through. I only seem to be able to pull through the "name" and "ping"...

Also, how would I go about having an input text box for the player to type things in e.g. server name, player name etc?
Apathy Now!
User avatar
MauveBib
 
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am

Re: MenuQC Help Needed

Postby Spike » Fri Jun 07, 2013 6:54 pm

try 'game' instead of 'gamedir'?
I guess fte is a bit more permissive

regarding text entry, you'll have to draw it yourself. my version has that code in mitem_edittext.qc in that zip I already linked.
for menuqc specifically, m_keydown takes two arguments. the first is the 'scancode', the second is the 'charcode'. if its a proper text char (a-z, A-Z, 0-9, punctuation, etc) then the charcode value will contain a non-zero value.
you can then:
curval = strcat(curval, chr2str(charcode));
to append the printable char.
however you'll first want to check the scancode to see if its backspace or delete and use substring accordingly instead, of course (specify -1 for the length if you want the entire rest of the string by the way).

but yeah, you guessed it. draw it yourself, and do your own keyboard input.

once you do have text entry working, you can just sethostcachemaskstring() and then redo your sethostcachemaskstring calls with the new settings. the list should update accordingly.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: MenuQC Help Needed

Postby MauveBib » Fri Jun 07, 2013 7:30 pm

Yeah, I pretty much figured that'd be the case for text boxes.

"game" works, but only pulls through "Darkplaces-Quake" for everything, so it's not much use for filtering on. Hmm.
Apathy Now!
User avatar
MauveBib
 
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am

Re: MenuQC Help Needed

Postby MauveBib » Sat Jun 08, 2013 3:25 pm

Ok, a bit of trial and error, and the field name we're after is "mod".
Apathy Now!
User avatar
MauveBib
 
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am

Re: MenuQC Help Needed

Postby MauveBib » Sat Jun 08, 2013 4:36 pm

Ok, really weird one.

To start a server I've got a button that runs the following:

cmd ("map start");

This works fine as long as the client has already been in a map, but if it's done straight from the menu without entering a map first it crashes DP half way through loading the map. Typing it from the console works fine.

I can even go into a map from the console, then crash out of the map back to the console and then the button will work, but straight from loading it crashes DP...

Anyone have any ideas at all?
Apathy Now!
User avatar
MauveBib
 
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am

Re: MenuQC Help Needed

Postby Spike » Sat Jun 08, 2013 5:17 pm

define 'crash'.

there's no \n of course. but that shouldn't crash the engine, you'll just get some message about the map 'start<SOMECONSOLECOMMAND>' not being found when you next trigger some console command.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: MenuQC Help Needed

Postby MauveBib » Sat Jun 08, 2013 5:30 pm

Physically crash out of the engine, window message "darkplaces has crashed..." or whatever.

I've tried with and without \n.
Apathy Now!
User avatar
MauveBib
 
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am

Re: MenuQC Help Needed

Postby LordHavoc » Thu Jun 13, 2013 6:45 pm

Try "\nmap start\n" and see if that does anything good? The crash is definitely a bug though.
LordHavoc
 
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA

Re: MenuQC Help Needed

Postby MauveBib » Wed Jul 31, 2013 8:29 pm

In the end I threw in a massive hack to just load a map at the start of the game and force the menu over the top, but obviously if it's fixable that'd be way better.

I'm away from home for a few more weeks but I'll have a play when I get back.
Apathy Now!
User avatar
MauveBib
 
Posts: 634
Joined: Thu Nov 04, 2004 1:22 am


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest