Archived copy of war3source.com, the War3Source forum (2009–2020), rebuilt from the Internet Archive by wc3mods.net. This page was captured on 2012-09-22 (original capture). Forum · All archived topics · Wiki · Bug tracker · Blog
Chat

War3:Source
September 21, 2012, 09:46:31 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Download: http://war3source.com/index.php?board=9.0
What is War3Source?: http://war3source.com/index.php?topic=200.0
Sample Stats: http://war3source.com/war3stats
Steam Community Group: http://steamcommunity.com/groups/war3source
War3Source SVN Checkout: http://ownageclan.com/svn/war3source/
War3Source servers: http://www.game-monitor.com/search.php?vars=war3_version=
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: racechange menu * Categories  (Read 272 times)
-El Diablo
Full Member
***
Posts: 175


View Profile
« on: May 23, 2012, 04:57:12 AM »

At one time, I was able to get race categories to work... but now when I need to start using them I forgot what I did to get it working.

The shopmenu item categories work perfectly, other than I don't get a next/back button.

It looks as though two different programmers made the categories work for shopmenu item and racechange menu, because the methods are using two different ways.


Can someone tell me some steps that I might have missed while trying to get racechange menu to work? I've tried to set the variable war3_racecats 1, and also used war3_reloadcats.

When I set war3_racecats 1, the command for changerace doesn't respond or work.  During debug I've found that the for(new i=1;i<CatCount;i++)  only displays 1 category and hangs.  I've got all the categories setup for all the races, as I only have 4 categories.

I'm still in the process of debugging trying to figure out why it won't display the category menu for changerace menu.  It knows it needs to display it, but for some reason hangs.

Something tells me the problem exists right here:

Code:
for(new i=1;i<CatCount;i++) {
W3GetCategory(i,strCat,sizeof(strCat));

if(strlen(strCat)>0) {
if(HasCategoryAccess(client,i)) {
new amount=GetNewRacesInCat(client,strCat);
if(amount>0) {
decl String:buffer[64];
Format(buffer,sizeof(buffer),"%s (%i new races)",strCat,amount);
}
else
AddMenuItem(crMenu,strCat,strCat);



Anyone have a clue to why it won't display the changerace menu?  That I'm missing something or did something wrong?


on a side note: war3_racecats 0 works fine.  It displays the regular non-category changerace menu.
« Last Edit: May 23, 2012, 04:59:02 AM by -El Diablo » Logged
Revan
Sr. Member
****
Posts: 263



View Profile
« Reply #1 on: May 23, 2012, 07:03:44 AM »

I've already fixed that yesterday, grab it from the svn Wink

btw:
It looks as though two different programmers made the categories work for shopmenu item and racechange menu, because the methods are using two different ways
thats correct, glider made shopitem categories - race cats are made by me
« Last Edit: May 23, 2012, 07:13:39 AM by Revan » Logged

-El Diablo
Full Member
***
Posts: 175


View Profile
« Reply #2 on: May 23, 2012, 09:24:30 AM »

Sweet! I can't wait to try this out when I get home tonight!
Logged
Glider⠠⠵
Global Moderator
Sr. Member
*****
Posts: 402


⠠⠵


View Profile
« Reply #3 on: May 23, 2012, 12:04:56 PM »

It looks as though two different programmers made the categories work for shopmenu item and racechange menu, because the methods are using two different ways.

Open Source ftw  Grin
Logged

-El Diablo
Full Member
***
Posts: 175


View Profile
« Reply #4 on: May 23, 2012, 05:51:04 PM »

Sad I just tried the new code .... it now doesn't work for both changeraces..  with or without cats enabled.

I've having to use my own source.
Logged
Revan
Sr. Member
****
Posts: 263



View Profile
« Reply #5 on: May 24, 2012, 02:29:53 AM »

That should be impossible since nothing on the uncatted were changed(Check diff Log)
it works just perfect for me. i'll take a look at it.
Logged

-El Diablo
Full Member
***
Posts: 175


View Profile
« Reply #6 on: May 24, 2012, 03:49:55 AM »

Usually when I had a problem with the shopmenus from not working, I was missing a translation file.  Is there a translation file required for the category system to work?  Cause I can't find a specific one that is needed via the source code... maybe you can tell me which translation files i need for cateogry system to work?

I was thinking that to be the problem, but when both ways on war3_racecats didn't work .. boolean... I was like Huh?  I had to recompile my own .bak code to get the non-category system working again.

I know one of the old versions of the category system worked.. i'll be hunting it down and seeing which one it was...

This category system is uber important to me at this time, and any further development has been put to a halt.. other than my helping the wiki.
Logged
Revan
Sr. Member
****
Posts: 263



View Profile
« Reply #7 on: May 24, 2012, 08:10:44 AM »

I've compared the category system from the svn with my local copy and they're nearly identical(my working copy just supports an additional w3cvar which is used to hide specific races if certain dependency's aren't met yet)
check your error logs(addons/sourcemod/logs), if something is wrong with your translation file(s) sourcemod will log thoose errors
Logged

-El Diablo
Full Member
***
Posts: 175


View Profile
« Reply #8 on: May 24, 2012, 08:21:47 AM »

I've compared the category system from the svn with my local copy and they're nearly identical(my working copy just supports an additional w3cvar which is used to hide specific races if certain dependency's aren't met yet)
check your error logs(addons/sourcemod/logs), if something is wrong with your translation file(s) sourcemod will log thoose errors

I keep forgetting to check the logs! Sad

I'm so used to my compiler finding the problems before it compiles the copy.  Pascal / Delphi programming is not so lax like C/C++ and sourcepawn.  It's very strict and to the point and doesn't require you to do much "debugging".  Once you learn the syntax, your good to go.  Its RAD programming. (Rapid Application Development).


« Last Edit: May 24, 2012, 08:26:14 AM by -El Diablo » Logged
-El Diablo
Full Member
***
Posts: 175


View Profile
« Reply #9 on: May 24, 2012, 07:04:59 PM »

New problem... fixed all my translation issues, removed all non-packaged races, and used the update to date svn from the main branch.. but i get these new errors:

Code:
L 05/24/2012 - 20:39:57: [SM] Plugin encountered error 25: Call was aborted
L 05/24/2012 - 20:39:57: [SM] Native "ThrowError" reported: Could not GET Cvar: cvarid 0
L 05/24/2012 - 20:39:57: [SM] Displaying call stack trace for plugin "war3source\War3Source_Engine_TrieKeyValue.smx":
L 05/24/2012 - 20:39:57: [SM]   [0]  Line 69, War3Source_Engine_TrieKeyValue.sp::NW3GetCvar()
L 05/24/2012 - 20:39:57: [SM] Plugin encountered error 25: Call was aborted
L 05/24/2012 - 20:39:57: [SM] Native "W3GetCvar" reported: Error encountered while processing a dynamic native
L 05/24/2012 - 20:39:57: [SM] Displaying call stack trace for plugin "war3source\War3Source_Engine_MenuChangerace.smx":
L 05/24/2012 - 20:39:57: [SM]   [0]  Line 171, War3Source_Engine_MenuChangerace.sp::GetNewRacesInCat()
L 05/24/2012 - 20:39:57: [SM]   [1]  Line 207, War3Source_Engine_MenuChangerace.sp::War3Source_ChangeRaceMenu()
L 05/24/2012 - 20:39:57: [SM]   [2]  Line 121, War3Source_Engine_MenuChangerace.sp::OnWar3Event()


Please help me solve them.. thanks.
Logged
Revan
Sr. Member
****
Posts: 263



View Profile
« Reply #10 on: May 25, 2012, 04:46:38 AM »

okay ty
grab latest War3Source_Engine_MenuChangeRace.sp from svn and see if it is fixed now
Logged

-El Diablo
Full Member
***
Posts: 175


View Profile
« Reply #11 on: May 25, 2012, 05:04:59 AM »

okay ty
grab latest War3Source_Engine_MenuChangeRace.sp from svn and see if it is fixed now

Okay, I'll try that tonight and repost if its good or not.
Logged
-El Diablo
Full Member
***
Posts: 175


View Profile
« Reply #12 on: May 25, 2012, 08:30:05 PM »

Changerace Menu now works!!

The only problem now is that is broke the way the "No Race" prevention thingy works.. now people don't changerace.. they keep "No Race"  instead of changing race..

more than half my server is "no race" because it doesn't force them to change to a race .. Sad
Logged
Revan
Sr. Member
****
Posts: 263



View Profile
« Reply #13 on: May 26, 2012, 02:17:11 AM »

Changerace Menu now works!!

The only problem now is that is broke the way the "No Race" prevention thingy works.. now people don't changerace.. they keep "No Race"  instead of changing race..

more than half my server is "no race" because it doesn't force them to change to a race .. Sad

changerace menu on join dosen't displays?
Logged

-El Diablo
Full Member
***
Posts: 175


View Profile
« Reply #14 on: May 26, 2012, 11:53:48 AM »

not sure how i can test that yet, but thinking of making code that will force new players into a race of my choice.
Logged
Revan
Sr. Member
****
Posts: 263



View Profile
« Reply #15 on: May 26, 2012, 02:40:41 PM »

not sure how i can test that yet, but thinking of making code that will force new players into a race of my choice.

http://war3source.com/index.php?topic=1014.0
check gliders post on the bottom

edit: if you wan't we can work out a function which sets a random race which is available to the client(to avoid forcing each No Race users using for example Undead)
« Last Edit: May 26, 2012, 02:43:19 PM by Revan » Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!