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
Okay, what did I do wrong??

 
Post new topic   Reply to topic Printable version
 View previous topic  Extended tutorial Post :: Post Win32 Contenc.dll - v1.1.3  View next topic  
Author Message
AlphaBoB
Seasoned Helper


Gender:Gender:Male
Joined: Aug 12 2003
Posts: 140
Location: Everywhere you want to be.
Offline

PostPosted: Mon Sep 01, 2003 6:58 pm    Post subject: Okay, what did I do wrong?? Reply to topic Reply with quote

As an ASSS module:
Attached file


Compile line:
Code: Show/Hide
$ gcc beans.c -o beans.so -D_REENTRANT -D_GNU_SOURCE -fPIC
beans.c: In function `main':
beans.c:48: warning: return type of `main' is not `int'
$




ASSS error:
Quote:
...
I <cmod> loading C module 'directory' from 'external'
I <directory> server on port 58888 using name 'SSZ Beans'
I <directory> using 'sscentral.subspace.inet.fi' at 62.65.37.101 as a directory server
I <directory> using 'sscentral.subspacehq.com' at 199.232.158.5 as a directory server
Unrecoverable error (5): Error in loading module 'beans:MM_beansbot'
I <directory> using 'sscentral.subspace.net' at 216.37.52.235 as a directory server




sample.c - 3.64 KB
File downloaded or viewed 60 time(s)

sample.c - 3.64 KB
File downloaded or viewed 60 time(s)
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Tue Sep 02, 2003 2:55 pm    Post subject: Reply to topic Reply with quote

You probably need a prototype for main()
Code: Show/Hide
void main(void);

Although I would just get rid of that function.
Also I would compile with "-shared" (although I don't know what it means, lol).

Edit: and put "local" infront of all functions except the MM_func()
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
Grelminar
Creator of Asss


Joined: Feb 26 2003
Posts: 378
Offline

PostPosted: Tue Sep 02, 2003 7:43 pm    Post subject: Reply to topic Reply with quote

Um, how about you get rid of main entirely? You're not building an executable, you're building a shared library.

Yes, you do need "-shared" to build a shared library. It might make more sense to you if you compile into a .o file and then link that into a .so.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
AlphaBoB
Seasoned Helper


Gender:Gender:Male
Joined: Aug 12 2003
Posts: 140
Location: Everywhere you want to be.
Offline

PostPosted: Wed Sep 03, 2003 4:53 pm    Post subject: Reply to topic Reply with quote

Grelminar, how would I compile to a .o and then link? I'm used to MS VC++ doing it for me and I don't know all the GCC commands. --help doesn't give them all, such as -shared isn't listed and some others.

Edit: and I had the main() function because GCC gave an error, guess I need to do -shared for it to shut up : icon_biggrin.gif

Edit (x2): What should my whole GCC command line be?
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
AlphaBoB
Seasoned Helper


Gender:Gender:Male
Joined: Aug 12 2003
Posts: 140
Location: Everywhere you want to be.
Offline

PostPosted: Wed Sep 03, 2003 5:04 pm    Post subject: Reply to topic Reply with quote

Ahhh okay I got it compiled and loaded correctly. Now how do you make it so if someone types a command it calls a function, and doesn't show it on the chat to everyone else?

Edit: according to help.c I'm guessing that defining a function as C<cmdname> and calling AddCommand() is the way to do it.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Wed Sep 03, 2003 5:51 pm    Post subject: Reply to topic Reply with quote

You can use chat->SendMessage() to make the response appear as an arena message, but only for a specific player.
Don't forget to add your new commands to the capabilities.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
AlphaBoB
Seasoned Helper


Gender:Gender:Male
Joined: Aug 12 2003
Posts: 140
Location: Everywhere you want to be.
Offline

PostPosted: Wed Sep 03, 2003 6:55 pm    Post subject: Reply to topic Reply with quote

Smong wrote:
Don't forget to add your new commands to the capabilities.


Yes, I was just gonna ask if I was supposed to do that. icon_biggrin.gif
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
AlphaBoB
Seasoned Helper


Gender:Gender:Male
Joined: Aug 12 2003
Posts: 140
Location: Everywhere you want to be.
Offline

PostPosted: Wed Sep 03, 2003 9:34 pm    Post subject: Reply to topic Reply with quote

Okay now, if anyone would like to test out my two hours of writing for the "?zoneinfo" command you can come on in to SSZ Beans and try it out sa_tongue.gif I also made it play %104 (goal sound) when you make a goal. Dunno why it wasn't already; it wasn't even saying "Team Goal!" or "Enemy Goal!" Is there a module I need to load?
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
AlphaBoB
Seasoned Helper


Gender:Gender:Male
Joined: Aug 12 2003
Posts: 140
Location: Everywhere you want to be.
Offline

PostPosted: Thu Sep 04, 2003 5:08 pm    Post subject: Reply to topic Reply with quote

Dunno if any of these people tried out my command but I noticed that CypherJF (who is on this board) logged in, so he may have.

from the ?last command wrote:

Beans (v6) 6 seconds ago
Mr.Twit 1 hour ago
Mr.Twit 2 hours ago
Ez8 6 hours ago
www.goatse.cx/ 11 hours ago
SK8 BRD Element 18 hours ago
SteelShadow 2 days ago
CypherJF 2 days ago
HypnoticKirby 2 days ago
Evangalion 2 days ago


Edit: btw thanks whoever edited the code and made it an attachment, it looks much better now icon_smile.gif
EDIT: That was me. Once you have to scroll too much to see data, I usually suggest making it an attachment. -MGB

Edit again: I've added a ?zone\*zone command. I hope Grel will add all these basic commands to the latest version of ASSS.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Smong
Server Help Squatter


Joined: 1043048991
Posts: 0x91E
Offline

PostPosted: Thu Sep 04, 2003 5:24 pm    Post subject: Reply to topic Reply with quote

I went in and tried it out (Mr.Twit), although you could just use the F1 help.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website MSN Messenger
AlphaBoB
Seasoned Helper


Gender:Gender:Male
Joined: Aug 12 2003
Posts: 140
Location: Everywhere you want to be.
Offline

PostPosted: Fri Sep 05, 2003 11:05 pm    Post subject: Reply to topic Reply with quote

Yeah, okay, so it's a bad idea, but I was just practicing ASSS module-making.
Back to top
View users profile Send private message Add User to Ignore List AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> ASSS Custom Projects 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: 613 page(s) served in previous 5 minutes.

phpBB Created this page in 0.427424 seconds : 38 queries executed (91.3%): GZIP compression disabled