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
object toggling problem

 
Post new topic   Reply to topic Printable version
 View previous topic  Weapons Post :: Post mervbot troubles  View next topic  
Author Message
Tommyhawk
Newbie


Joined: Jul 14 2004
Posts: 14
Offline

PostPosted: Tue Jul 27, 2004 4:59 pm    Post subject: object toggling problem Reply to topic Reply with quote

I do this in command.cpp:

Code: Show/Hide
else if (c->check("testsb"))
{
   object_target(NULL);
   for (int i = 0; i <= 25; i++)
   {
      queue_enable(i);
   }
   toggle_objects();
}


But the merv terminal (Build 44) shows this:

ThawkBot Object number 0 enabled
ThawkBot Object number 19917 disabled
ThawkBot Object number 1 enabled
ThawkBot Object number 19917 disabled
ThawkBot Object number 2 enabled
ThawkBot Object number 19917 disabled
ThawkBot Object number 3 enabled
ThawkBot Object number 19917 disabled
ThawkBot Object number 4 enabled
ThawkBot Object number 19917 disabled
ThawkBot Object number 5 enabled
ThawkBot Object number 19917 disabled
ThawkBot Object number 6 enabled
ThawkBot Object number 19917 disabled
ThawkBot Object number 7 enabled
ThawkBot Object number 19917 disabled
ThawkBot Object number 8 enabled
ThawkBot Object number 19917 disabled
ThawkBot Object number 9 enabled
ThawkBot Object number 19917 disabled
ThawkBot Object number 20 enabled
ThawkBot Object number 19917 disabled
ThawkBot Object number 21 enabled
ThawkBot Object number 19917 disabled
ThawkBot Object number 22 enabled
ThawkBot Object number 19917 disabled

when I give it the command !testsb and half my objects don't turn on correctly. Although my objects seem to work OK if the bot doesn't have sysop. No matter what objects I try to turn on or off I always get those "Object number 19917 disable messages". Anyone know why?
Back to top
View users profile Send private message Add User to Ignore List
Underlord
Novice


Gender:Gender:Male
Joined: Feb 17 2004
Posts: 55
Offline

PostPosted: Tue Jul 27, 2004 5:42 pm    Post subject: Reply to topic Reply with quote

use the current core/tutorial source off mervbot.com

or at least update spawns.h to...

Code: Show/Hide

union objectInfo
{
   struct
   {
      Uint16 id            : 15;   // Object ident
      Uint16 disabled      : 1;   // 1=off, 0=on
   };

   Uint16 n;
};

#define MAX_OBJECTS 20
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Tommyhawk
Newbie


Joined: Jul 14 2004
Posts: 14
Offline

PostPosted: Tue Jul 27, 2004 5:59 pm    Post subject: Reply to topic Reply with quote

That worked icon_smile.gif I was using Build 44 core but my spawns.h was using unsigned variables instead of Uint16's. Damn different versions kill me. Thanks alot.
Back to top
View users profile Send private message Add User to Ignore List
Doggeti
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Jan 12 2003
Posts: 297
Location: Germany
Offline

PostPosted: Fri Aug 13, 2004 3:27 pm    Post subject: Reply to topic Reply with quote

I use Build 44. My code is
Code: Show/Hide
case EVENT_SoccerGoal:
      {
         int team = *(int*)&event.p[0];
         int reward = *(int*)&event.p[1];

         if (team == 0)
         {
            sendPublic("Team 0 scores");
            object_target(NULL);
            queue_enable(3);
            queue_enable(4);
            toggle_objects();
         }
         else if (team == 1)
         {
            sendPublic("Team 1 scores");
            object_target(NULL);
            queue_enable(1);
            queue_enable(2);
            toggle_objects();
         }
      }
I see the 'Team # scores' messages but not the objects. I can turn them on manually. The objectInfo union is not in spawns.h (which I don't even have) but in clientprot.h. Is that the reason why it doesn't work?
I tried giving the bot SysOp as well as SMod.
_________________
Expect the worst but hope for the best.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Doggeti
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Jan 12 2003
Posts: 297
Location: Germany
Offline

PostPosted: Tue Aug 17, 2004 3:03 pm    Post subject: Reply to topic Reply with quote

Does nobody know the answer ??
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Bak
?ls -s
0 in


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

PostPosted: Tue Aug 17, 2004 4:32 pm    Post subject: Reply to topic Reply with quote

perhaps you're building with an old template? check your spawns.h to make sure it has

Code: Show/Hide
union objectInfo
{
   struct
   {
      Uint16 id            : 15;   // Object ident
      Uint16 disabled      : 1;   // 1=off, 0=on
   };

   Uint16 n;
};

#define MAX_OBJECTS 20
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Underlord
Novice


Gender:Gender:Male
Joined: Feb 17 2004
Posts: 55
Offline

PostPosted: Tue Aug 17, 2004 5:12 pm    Post subject: Reply to topic Reply with quote

fix objectInfo in clientprot.h
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Doggeti
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Jan 12 2003
Posts: 297
Location: Germany
Offline

PostPosted: Wed Aug 18, 2004 3:59 pm    Post subject: Reply to topic Reply with quote

@ Bak: Where do you have spawns.h? I only have spawn.h. In latest build (44) this union is in clientprot.h

My union objectInfo looks just like Baks.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
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 18, 2004 4:50 pm    Post subject: Reply to topic Reply with quote

spawn.h = spawns.h
_________________
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
Guest



Offline

PostPosted: Fri Dec 31, 2004 4:47 am    Post subject: Reply to topic Reply with quote

It still doesn't work in build 45, not as mod, smod and sysop.
I also tried sendPublic("*objset 3,4,"); which works when i use it.
Back to top
Doggeti
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Jan 12 2003
Posts: 297
Location: Germany
Offline

PostPosted: Fri Dec 31, 2004 4:48 am    Post subject: Reply to topic Reply with quote

SORRY, my bad, I placed the code in the wrong event, please delete this and the above post, thanks.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
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: 382 page(s) served in previous 5 minutes.

phpBB Created this page in 0.513493 seconds : 35 queries executed (84.4%): GZIP compression disabled