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
Learning C

 
Post new topic   Reply to topic Printable version
 View previous topic  Buy Bot Post :: Post How do you prevent this?  View next topic  
Author Message
Guest



Offline

PostPosted: Fri Feb 01, 2008 7:23 am    Post subject: Learning C Reply to topic Reply with quote

I'm trying to learn C in an attempt to make plugins for MERVBot.

Where do I begin? I have Dev C++ and I've downloaded and looked at the source of MERVBot, but it all looks like a bunch of jibberish. I've also checked out a few C tutorials, but nothing seems to help me understand.

Can anyone point me in the right direction?
Back to top
Animate Dreams
Gotta buy them all!
(Consumer whore)


Age:37
Gender:Gender:Male
Joined: May 01 2004
Posts: 821
Location: Middle Tennessee
Offline

PostPosted: Fri Feb 01, 2008 12:19 pm    Post subject: Reply to topic Reply with quote

Um, The C tutorials would be the right direction you're looking for. I really don't know how to get any more basic than that. I believe http://www.cplusplus.com has tutorials, you might want to check those out.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address MSN Messenger
Samapico
No, these DO NOT look like penises, ok?


Joined: May 08 2003
Posts: 1252
Offline

PostPosted: Fri Feb 01, 2008 1:18 pm    Post subject: Reply to topic Reply with quote

Yeah, read some cplusplus.com before attempting to make plugins. Once you get used to the language, you can try to understand the structure of a MERV plugin.
_________________
(Insert a bunch of dead links here)
Back to top
View users profile Send private message Add User to Ignore List
Guest



Offline

PostPosted: Fri Feb 01, 2008 1:30 pm    Post subject: Reply to topic Reply with quote

Samapico wrote:
Yeah, read some cplusplus.com before attempting to you can try to understand the structure of a MERV plugin.

I have a feeling that's going to be the hardest part.

Any tips for the future?
Back to top
tcsoccerman
Server Help Squatter


Age:33
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Fri Feb 01, 2008 3:42 pm    Post subject: Reply to topic Reply with quote

you caqn also try the help file in devcpp. it's at help menu in the menustrip.
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Guest



Offline

PostPosted: Fri Feb 01, 2008 6:31 pm    Post subject: Reply to topic Reply with quote

I'm having a terrible time getting anything to work in Dev-C++. When I go to compile even the simplest program from a tutorial, it gives me a write "Error 1".

I don't know what the hell happened to it, but it used to work fine.

Can you recommend any other programs?
Back to top
CypherJF
I gargle nitroglycerin


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

PostPosted: Fri Feb 01, 2008 6:57 pm    Post subject: Reply to topic Reply with quote

Error 1?

Could you copy the compile logs?
_________________
Performance is often the art of cheating carefully. - James Gosling
Back to top
View users profile Send private message Add User to Ignore List
Guest



Offline

PostPosted: Fri Feb 01, 2008 7:59 pm    Post subject: Reply to topic Reply with quote

Sure, here.

Code: Show/Hide
Compiler: Default compiler
Building Makefile: "C:\Documents and Settings\Owner\Desktop\C++\Makefile.win"
Executing  make...
make.exe -f "C:\Documents and Settings\Owner\Desktop\C++\Makefile.win" all
g++.exe -c Untitled1.cpp -o Untitled1.o -I"C:/Dev-Cpp/lib/gcc/mingw32/3.4.2/include"  -I"C:/Dev-Cpp/include/c++/3.4.2/backward"  -I"C:/Dev-Cpp/include/c++/3.4.2/mingw32"  -I"C:/Dev-Cpp/include/c++/3.4.2"  -I"C:/Dev-Cpp/include"   

Untitled1.cpp:1:10: #include expects "FILENAME" or <FILENAME>
Untitled1.cpp:2: error: expected unqualified-id before '<' token
Untitled1.cpp:2: error: expected `,' or `;' before '<' token

make.exe: *** [Untitled1.o] Error 1

Execution terminated
Back to top
CypherJF
I gargle nitroglycerin


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

PostPosted: Fri Feb 01, 2008 8:03 pm    Post subject: Reply to topic Reply with quote

And your Untitled1.cpp file?

Obviously, it's pointing at line 10; something you have with your #include statement isn't what it's expecting.
Back to top
View users profile Send private message Add User to Ignore List
Guest



Offline

PostPosted: Fri Feb 01, 2008 8:45 pm    Post subject: Reply to topic Reply with quote

Ok, well.. I copied it directly from a tutorial and it says it's a working program.

See here: http://www.cprogramming.com/tutorial/c/lesson1.html

Code: Show/Hide
#include
<stdio.h>

int main()
{
  printf( "I am alive!  Beware.\n" );
  getchar();
  return 0;
}


and yes, Untitled1.cpp.
Back to top
tcsoccerman
Server Help Squatter


Age:33
Gender:Gender:Male
Joined: Jan 15 2007
Posts: 694
Location: Atlantis
Offline

PostPosted: Fri Feb 01, 2008 8:55 pm    Post subject: Reply to topic Reply with quote

i don't know if this is how it is in the file, but try having

#include <stdio.h>

instead of

#include
<stdio.h>
Back to top
View users profile Send private message Add User to Ignore List Send email AIM Address
Guest



Offline

PostPosted: Fri Feb 01, 2008 9:40 pm    Post subject: Reply to topic Reply with quote

Heh, that did it.

Thanks a lot.

I'm gonna take a look at the tutorials you guys posted and if I have any more questions, I will post here.
Back to top
Animate Dreams
Gotta buy them all!
(Consumer whore)


Age:37
Gender:Gender:Male
Joined: May 01 2004
Posts: 821
Location: Middle Tennessee
Offline

PostPosted: Wed Feb 06, 2008 5:37 pm    Post subject: Reply to topic Reply with quote

Yeah... anything that begins with # is a preprocessor or precompiler directive iirc, and all directives like that have to be on one line, and aren't ended with semicolons. It's not really being compiled, it's translated before the actual compilation. Just FYI.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website AIM Address MSN Messenger
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.516458 seconds : 37 queries executed (94.5%): GZIP compression disabled