Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Elim Plugin

 
Post new topic   Reply to topic Printable version
 View previous topic  Warp Plug In Post :: Post Flood Arena w/ stats.  View next topic  
Author Message
blackmoon
Novice


Joined: Aug 27 2003
Posts: 70
Offline

PostPosted: Fri Jul 30, 2004 1:27 pm    Post subject: Elim Plugin Reply to topic Reply with quote

Okay... first off, I posted this help request in ssforum.net and didnt really get a response. I have the elim.dll plugin which is cool, however, I do not want it to give the option of Zombies or Conquer. I only want Elim, Team Elim, Warbird Elim and Race. Can anyone help me with that?

Someone sent me the source code but I am not a programmer. However, I tried compiling the source code without modifying it and the plugin wouldn't work still, so I figured it was pointless trying to get it to work.I am using Merv b44 if that makes a difference.
_________________
No, that was just a love tap... here's the bitch slap!

-Pimp Daddy Black
Back to top
View users profile Send private message Add User to Ignore List
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Fri Jul 30, 2004 1:55 pm    Post subject: Reply to topic Reply with quote

Using b44 shouldn't make any difference.
_________________
Performance is often the art of cheating carefully. - James Gosling
Back to top
View users profile Send private message Add User to Ignore List
blackmoon
Novice


Joined: Aug 27 2003
Posts: 70
Offline

PostPosted: Fri Jul 30, 2004 3:14 pm    Post subject: Reply to topic Reply with quote

Ok... maybe I was given bad source code? I used the MervBot source found in the src.zip for the base folder and I followed the tutorial directions for VS6.0.
Back to top
View users profile Send private message Add User to Ignore List
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Sun Aug 01, 2004 11:35 am    Post subject: Reply to topic Reply with quote

My suggestion would be to modify glock to support multiple games. If you didn't want to do that, you could just take the other options out of the plugin. If you don't want to do any programming, just use !force during voting
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
blackmoon
Novice


Joined: Aug 27 2003
Posts: 70
Offline

PostPosted: Mon Aug 02, 2004 3:13 am    Post subject: Reply to topic Reply with quote

I tried removing the options, but my dilema is that even if I dont modify the code and compile it, the plugin still doesnt work. Bad source code? I dunno. I really want to atleast try to modify it myself. Can someone send me some mervsource/elim source that they know for a fact is good?? I would atleast like to try to do it on my own.
Back to top
View users profile Send private message Add User to Ignore List
blackmoon
Novice


Joined: Aug 27 2003
Posts: 70
Offline

PostPosted: Wed Aug 04, 2004 3:57 am    Post subject: Reply to topic Reply with quote

It's me again... and I am still on my quest to get this thing working. I used the !glock but it only allows me to lock 1 game. I have to found any source code that seems to work. If I compile it without making any changes, it gives me an error about 'i' having multiple declarations and such. I tried using merv 38 and merv 44 as the base and it still gives me the errors. Any ideas?
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:26
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Wed Aug 04, 2004 7:21 am    Post subject: Reply to topic Reply with quote

post the source and post all the errors
Back to top
View users profile Send private message Add User to Ignore List AIM Address
blackmoon
Novice


Joined: Aug 27 2003
Posts: 70
Offline

PostPosted: Wed Aug 04, 2004 10:02 am    Post subject: Reply to topic Reply with quote

Here are the errors in my output box:

--------------------Configuration: elim - Win32 Debug--------------------
Compiling...
spawn.cpp
C:\Documents and Settings\Desktop\plugin\b44\elim\spawn.cpp(85) : error C2374: 'i' : redefinition; multiple initialization
C:\Documents and Settings\Desktop\plugin\b44\elim\spawn.cpp(64) : see declaration of 'i'
Error executing cl.exe.

elim.dll - 1 error(s), 0 warning(s)


Here is the source code, unmodified:




elim.rar - 25.66 KB
File downloaded or viewed 39 time(s)
Back to top
View users profile Send private message Add User to Ignore List
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Wed Aug 04, 2004 10:48 am    Post subject: Reply to topic Reply with quote

You simply can not use the same variable name, taking into account for any scoping issues, for redeclaration. ie:

int x;

String x; // this will error since "x" is an integer


I'm assuming since you use "i", you use'd a for loop or something along those lines, where you may have done something like:

for (int i = 0; ...

for (int i = 0; ...) // this should be for (i=0, ...)

hopes this helps
Back to top
View users profile Send private message Add User to Ignore List
Bak
?ls -s
0 in


Age:26
Gender:Gender:Male
Joined: Jun 11 2004
Posts: 1826
Location: USA
Offline

PostPosted: Wed Aug 04, 2004 11:25 am    Post subject: Reply to topic Reply with quote

damn cypher... talk about hitting the nail on the head... you didn't look at the source did you?

blackmoon, you want to change your EndVote function to:

Code: Show/Hide
int botInfo::EndVote()
{
   if (override)
      return vote_default;

   int votes[MAX_VOTE];
   int i;

   for (i = 0; i < MAX_VOTE; ++i)
      votes[i] = 0;

   _listnode <Player> *parse = playerlist->head;

   while (parse)
   {
      Player *p = parse->item;

      int vote = get_tag(p, 2);

      if (vote >= vote_low && vote <= vote_high)
      {
         ++votes[vote];
      }

      parse = parse->next;
   }

   int best = vote_default;

   for (i = vote_low; i <= vote_high; ++i)
      if (votes[best] < votes[i]) best = i;

   return best;
}


in spawns.cpp
Back to top
View users profile Send private message Add User to Ignore List AIM Address
CypherJF
I gargle nitroglycerin


Gender:Gender:Male
Joined: Aug 14 2003
Posts: 2582
Location: USA
Offline

PostPosted: Wed Aug 04, 2004 11:53 am    Post subject: Reply to topic Reply with quote

Nope, I didn't look at the src tongue.gif just it's a common error that many people, including myself, do from time to time. icon_smile.gif
Back to top
View users profile Send private message Add User to Ignore List
blackmoon
Novice


Joined: Aug 27 2003
Posts: 70
Offline

PostPosted: Wed Aug 04, 2004 12:42 pm    Post subject: Reply to topic Reply with quote

kk... I tried it... now I get...

--------------------Configuration: elim - Win32 Debug--------------------
Linking...
Creating library Debug/elim.lib and object Debug/elim.exp
command.obj : error LNK2001: unresolved external symbol "public: struct PlayerRank * __thiscall ElimRanks::FindRank(char *)" (?FindRank@ElimRanks@@QAEPAUPlayerRank@@PAD@Z)
spawn.obj : error LNK2001: unresolved external symbol "public: struct PlayerRank * __thiscall ElimRanks::FindRank(char *)" (?FindRank@ElimRanks@@QAEPAUPlayerRank@@PAD@Z)
command.obj : error LNK2001: unresolved external symbol "public: void __thiscall ElimRanks::SaveRanks(char const *)" (?SaveRanks@ElimRanks@@QAEXPBD@Z)
spawn.obj : error LNK2001: unresolved external symbol "public: void __thiscall ElimRanks::SaveRanks(char const *)" (?SaveRanks@ElimRanks@@QAEXPBD@Z)
spawn.obj : error LNK2001: unresolved external symbol "public: void __thiscall ElimRanks::ResortPlayers(void)" (?ResortPlayers@ElimRanks@@QAEXXZ)
spawn.obj : error LNK2001: unresolved external symbol "public: void __thiscall ElimRanks::AddRank(struct DiskRank *,bool)" (?AddRank@ElimRanks@@QAEXPAUDiskRank@@_N@Z)
spawn.obj : error LNK2001: unresolved external symbol "public: void __thiscall ElimRanks::LoadRanks(char const *)" (?LoadRanks@ElimRanks@@QAEXPBD@Z)
elim.dll : fatal error LNK1120: 5 unresolved externals
Error executing link.exe.

elim.dll - 8 error(s), 0 warning(s)

guess I should actually take more time learning C++ and looking at this all. lol!
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:37
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Wed Aug 04, 2004 1:20 pm    Post subject: Reply to topic Reply with quote

The redefinition thing is not a user error. Variables declared in the parentheses of the for loop are, by the C++ standard, go out of scope as soon as the loop ends. However, VC6 (and below?) puts it in the scope outside the loop. MS fixed it in VC7 and that's the one Catid uses. Therefore, Catid code has to be changed to compile of VC6.

Your linker errors, however, are. icon_razz.gif It sounds like you didn't include "rank.cpp" in your project.
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
blackmoon
Novice


Joined: Aug 27 2003
Posts: 70
Offline

PostPosted: Wed Aug 04, 2004 4:18 pm    Post subject: Reply to topic Reply with quote

thanks... that worked and I was able to modify it for my needs. Thanks!
Back to top
View users profile Send private message Add User to Ignore List
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Bot Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 351 page(s) served in previous 5 minutes.

phpBB Created this page in 0.585384 seconds : 40 queries executed (89.5%): GZIP compression disabled