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
Warning:

 
Post new topic   Reply to topic Printable version
 View previous topic  Weird. Post :: Post Mervbot rotate  View next topic  
Author Message
The Arctica
Newbie


Gender:Gender:Male
Joined: Dec 04 2004
Posts: 13
Offline

PostPosted: Tue May 17, 2005 3:56 am    Post subject: Warning: Reply to topic Reply with quote

Ehhh, how can i get this warning away ?

Code: Show/Hide
bool getTurret(String player, String turret, int posx, int posy)
   {
      Turret *t;
      if (t->name == player)
      {
         if (turret == lvl1_1)
         {
            if ( (posx / 16) > 311 && (posx / 16) < 315 && (posy / 16) > 317 && (posy / 16) < 321)
            {
               t->tur = turret;
               return true;
            }
            return false;
         }
      }
      t->name = player;
      t->tur = turret;

      return true;
   }


Alright it says :
Quote:
d:\mervbot\src\master\spawn.h(42) : warning C4700: local variable 't' used without having been initialized

_________________
Back to top
View users profile Send private message Add User to Ignore List
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Tue May 17, 2005 4:05 am    Post subject: Re: Warning: Reply to topic Reply with quote

Code: Show/Hide

Turret *t;
      if (t->name == player)
      {
         


The problem is that you are declaring the variable Turret *t, but never initialized it with a default value.
In the if() statement you are trying to use the variable though.

Look in the constructor of the class Turret on how to initialize the t variable.
_________________
Nickname: Maverick (I changed my name!)
TWCore developer | Subspace statistics
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Tue May 17, 2005 1:04 pm    Post subject: Reply to topic Reply with quote

Maybe learn C++. Inorder to write/understand a language you first have to learn it, otherwise you are just a script kiddy.
_________________
Current Terror Alert Level
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
The Arctica
Newbie


Gender:Gender:Male
Joined: Dec 04 2004
Posts: 13
Offline

PostPosted: Tue May 17, 2005 3:42 pm    Post subject: Reply to topic Reply with quote

im trying to learn, not easy tho, im just 14 years icon_wink.gif, found the problem, had to be Turret ; and then strcpy(t.name, player)
do you know a good website to learn C++ ?
Thanks.

-Arctica
Back to top
View users profile Send private message Add User to Ignore List
The Arctica
Newbie


Gender:Gender:Male
Joined: Dec 04 2004
Posts: 13
Offline

PostPosted: Tue May 17, 2005 3:43 pm    Post subject: Reply to topic Reply with quote

im trying to learn, not easy tho, im just 14 years icon_wink.gif, found the problem, had to be Turret ; and then strcpy(t.name, player)
do you know a good website to learn C++ ?
Thanks.

-Arctica
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: Tue May 17, 2005 4:56 pm    Post subject: Reply to topic Reply with quote

I recommend this site:

http://computer.howstuffworks.com/c.htm

I'm guessing most of the things you're doing in c++ can be done with C anyways, and this one has good illustrating pictures and doesn't use cout biggrin.gif
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Tue May 17, 2005 5:12 pm    Post subject: Reply to topic Reply with quote

d1st0rt = realloc(d1st0rt, NULL);

INSERT INTO d1st0rt.nose
VALUES ('hammer');

mount /dev/spoon /home/d1st0rt/ears
Back to top
View users profile Send private message Add User to Ignore List
50% Packetloss
Server Help Squatter


Age:40
Gender:Gender:Male
Joined: Sep 09 2003
Posts: 561
Location: Santa Clarita, California
Offline

PostPosted: Wed May 18, 2005 3:18 am    Post subject: Reply to topic Reply with quote

If you are trying to learn a language, you usually don't start by writting a novel in the language you don't even know yet. Mervbot is not something you should be involved in until you completely understand the language.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
D1st0rt
Miss Directed Wannabe


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

PostPosted: Wed May 18, 2005 8:07 pm    Post subject: Reply to topic Reply with quote

Solo, the relevance of that post divided by your sense of humor is NaN biggrin.gif
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Wed May 18, 2005 9:12 pm    Post subject: Reply to topic Reply with quote

Now THIS is a fun thread! icon_smile.gif
_________________
4,691 irradiated haggis!
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: Fri May 20, 2005 5:19 pm    Post subject: Reply to topic Reply with quote

Code: Show/Hide
void makeFun(Thread *t)
{
   CloseHandle(SoloAce);
   t->fun++;
}


Use C++.com silly geese.
_________________
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
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Fri May 20, 2005 5:28 pm    Post subject: Reply to topic Reply with quote

*cough*

Code: Show/Hide
void Thread::makeFun ()
{
CloseHandle(SoloAce);
m_fun++;
}
Back to top
View users profile Send private message Add User to Ignore List
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Fri May 20, 2005 5:43 pm    Post subject: Reply to topic Reply with quote

Hah.

I'M A PERSISTENT OBJECT, DENIED.

~CyanFire(); THAT'S WHAT YOUR NAME SHOULD BE.

Yay, this thread should win the MGB's forums nerd award.
Back to top
View users profile Send private message Add User to Ignore List
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Fri May 20, 2005 5:47 pm    Post subject: Reply to topic Reply with quote

Code: Show/Hide
#!/usr/bin/env python
# This is the source to Ekted, some newbie

import os

ekted = 'ekted'
run = "echo %s > /dev/null" % ekted

os.system(run)
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: Sat May 21, 2005 1:22 pm    Post subject: Reply to topic Reply with quote

Code: Show/Hide
#!/usr/bin/env python
# This is the source to Solo Ace

import ohnoes

SoloAce = 'PENGUIN!!rofl'
os.system(EXPLODE4win!)
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Solo Ace
Yeah, I'm in touch with reality...we correspond from time to time.


Age:37
Gender:Gender:Male
Joined: Feb 06 2004
Posts: 2583
Location: The Netherlands
Offline

PostPosted: Sat May 21, 2005 2:16 pm    Post subject: Reply to topic Reply with quote

icon_surprised.gif
Code: Show/Hide
blah@xs3:~% ./d1st0rt.py
  File "./d1st0rt.py", line 7
    os.system(EXPLODE4win!)
                         ^
SyntaxError: invalid syntax


GG.

Don't you dare to whine about my "./", I'm not root there anyway!
Back to top
View users profile Send private message Add User to Ignore List
Maverick
broken record


Age:40
Gender:Gender:Male
Joined: Feb 26 2005
Posts: 1521
Location: The Netherlands
Offline

PostPosted: Sat May 21, 2005 3:24 pm    Post subject: Reply to topic Reply with quote

*cough* nerds *cough*
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
D1st0rt
Miss Directed Wannabe


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

PostPosted: Sat May 21, 2005 4:53 pm    Post subject: Reply to topic Reply with quote

That would be great if I had been trying for valid syntax biggrin.gif
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
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: Sat May 21, 2005 5:54 pm    Post subject: Reply to topic Reply with quote

Man, Ekted. And I even wrote C just for you!
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
2dragons
Novice


Joined: Feb 17 2004
Posts: 95
Offline

PostPosted: Mon May 23, 2005 3:15 am    Post subject: Reply to topic Reply with quote

Bleh you nerds! icon_eek.gif
_________________
Subspace Banner Emporium


Last edited by 2dragons on Tue May 24, 2005 1:03 am, edited 1 time in total
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: Mon May 23, 2005 11:54 am    Post subject: Reply to topic Reply with quote

Java infidel.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
D1st0rt
Miss Directed Wannabe


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

PostPosted: Mon May 23, 2005 4:49 pm    Post subject: Reply to topic Reply with quote

Hey, watch yourself. Our collective has a greater capacity to annoy and enrage you than you can handle.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
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: Mon May 23, 2005 5:15 pm    Post subject: Reply to topic Reply with quote

Don't worry, I know. Just search for "Java AND c++" on this forum and you'll see my learning experience. icon_biggrin.gif
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
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: 97 page(s) served in previous 5 minutes.

phpBB Created this page in 0.530102 seconds : 48 queries executed (91.0%): GZIP compression disabled