This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

sheep

Old posts that have not been replied to for several years.
Locked
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

sheep

Post by caesar »

I've wanted to load this sheep module and learn from it and make my own modules. The problem is that duno how to make it's makefile. I've copied the woobie's makefile and replaced inside from woobie to sheep. Did a ./configure make config and make and finaly I'm getting some errors:
gcc -pipe -fPIC -g -O2 -Wall -I. -I../../.. -I../../.. -I../../../src/mod -DHAVE_CONFIG_H -DMAKING_MODS -c .././sheep.mod/sheep.c
../sheep.mod/sheep.c:121: parse error before "static"
../sheep.mod/sheep.c:125: warning: type defaults to `int' in declaration of `table'
../sheep.mod/sheep.c:125: warning: initialization makes integer from pointer without a cast
../sheep.mod/sheep.c:125: initializer element is not constant
../sheep.mod/sheep.c:125: warning: data definition has no type or storage class
../sheep.mod/sheep.c:126: parse error before "if"
../sheep.mod/sheep.c:127: warning: type defaults to `int' in declaration of `table'
../sheep.mod/sheep.c:127: redefinition of `table'
../sheep.mod/sheep.c:125: `table' previously defined here
../sheep.mod/sheep.c:127: warning: initialization makes integer from pointer without a cast
../sheep.mod/sheep.c:127: initializer element is not constant
../sheep.mod/sheep.c:127: warning: data definition has no type or storage class
../sheep.mod/sheep.c:128: parse error before "if"
../sheep.mod/sheep.c:130: parse error before "int"
../sheep.mod/sheep.c:148: `sheep_close' undeclared here (not in a function)
../sheep.mod/sheep.c:148: initializer element is not constant
../sheep.mod/sheep.c:148: (near initialization for `sheep_table[1]')
{standard input}: Assembler messages:
{standard input}:425: Error: symbol `table' is already defined
make[2]: *** [../sheep.o] Error 1
make[2]: Leaving directory `/home/irc/temp/eggdrop1.6.13/src/mod/sheep.mod'
make[1]: *** [sheep.mod_so] Error 2
make[1]: Leaving directory `/home/irc/temp/eggdrop1.6.13/src/mod'
make: *** [modules] Error 2
What I'm doing wrong? I'm a newbie with the modules so I don't know. :)
Once the game is over, the king and the pawn go back in the same box.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

I can';t be bothered looking for it, but here are some things to try.

In the woobie Makefile, there are some lines regarding the files it is including in the process.

Make sure any .h fines in the sheep module directory are included in this list.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Actualy this sheep module dosen't have any .h files, just a sheep.c file. It's made by stdragon and it's available here.
Once the game is over, the king and the pawn go back in the same box.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I've managed and made a module on my own but seems that I'fe forgot to put something:
foo: Error loading module: No start function defined.
What start function I must put?
Once the game is over, the king and the pawn go back in the same box.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

Guess I must put this line: char *foo_start();
Once the game is over, the king and the pawn go back in the same box.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

See the sheep and woobie modules, they both contain the information pertaining the start function.

THe start function sets up and binds when the module is loaded.
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

I'm looking but duno on what to look for :)
Once the game is over, the king and the pawn go back in the same box.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

OK - there are two items you need.

1: A function table.

This has a minimum of 4 items, and defined which functions are accable outside of this module, and can provide stuff to other modules and the core.

The 4 items are the start, close, memory counter and status report functions.

These are used byt he core, thus must allways be exported.

2: There should be at least the fucntion talked of in the function table.

The sheep modules gived information ragrding both of these.
Locked