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
Tm_baw

 
Post new topic   Reply to topic Printable version
 View previous topic  Squad match plugins Post :: Post Baseduel  View next topic  
Author Message
ThunderJam
Newbie


Joined: Feb 04 2006
Posts: 15
Offline

PostPosted: Fri May 11, 2007 8:56 pm    Post subject: Tm_baw Reply to topic Reply with quote

Wanted to try editing SOS' tm_baw for some increased functionality but when i unzipped the src and tried to compile it spews out a bunch of errors that say:

error C2362: initialization of 'i2' is skipped by 'goto InvalidEntry'

i2 is a counter the counter in a for loop, im new to coding merv plugins so i really donno what to do

Code: Show/Hide
#define G2(a) if (isNumeric(buffer))\
         a = getInteger(buffer, 10);\
      else\
         goto InvalidEntry

      G("FromX1");
      if (!buffer[0])
         continue;

      Warp *w = new Warp;

      G2(w->x1);

      G("FromY1");
      G2(w->y1);

      G("FromX2");
      G2(w->x2);

      G("FromY2");
      G2(w->y2);

      G("Ship");
      G2(w->ship);

      G("ToY");
      G2(w->toY);

      G("ToX");
      G2(w->toX);

      G("Freq");
      G2(w->freq);

      for (Uint32 i2 = 0; i2 < 10; i2++)
      {
         String n;
         n = "PrivAction";
         n += i2;

         G(n.msg);
         w->PrivActions[i2] = buffer;

         n = "PubAction";
         n += i2;
         
         G(n.msg);
         w->PubActions[i2] = buffer;
      }

      Warps.append(w);

      continue;
InvalidEntry:
      delete w;
      String s;
      s = "Invalid warp.ini entry: ";
      s += i;
      tell(makeEcho(s.msg));
   }
}
Back to top
View users profile Send private message Add User to Ignore List
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Fri May 11, 2007 10:09 pm    Post subject: Reply to topic Reply with quote

probably because there's a variable being initialized between the GoTo and the InvalidEntry: label... If it worked before, maybe you're using a different compiler that doesn't accept that... I think that Visual Studio 2005 does quite a few things differently than Visual Studio 6 when it comes to C++

Try avoiding the GoTo statement completly...
The invalid entry thing could be a separate function instead, and you'd pass it 'w' so it can delete it

Also, try using more significant variable names... i2 is just ugly tongue.gif I don't know if you did that part or if it's part of SOS' code...
_________________
(Insert a bunch of dead links here)
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: Sat May 12, 2007 10:08 am    Post subject: Reply to topic Reply with quote

sounds like an older compiler... try changing the for loop to

Code: Show/Hide
for (i2=0; i2 < 10; i2++)


and before the #define add

Code: Show/Hide
Uint32 i2 = 0;

_________________
SubSpace Discretion: A Third Generation SubSpace Client
Back to top
View users profile Send private message Add User to Ignore List 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: 141 page(s) served in previous 5 minutes.

phpBB Created this page in 0.478333 seconds : 28 queries executed (94.9%): GZIP compression disabled