Welcome to the Builder Academy

Question Newbie Messages Snippet

More
29 Jul 2012 07:21 #468 by Liko
Replied by Liko on topic Re: Newbie Messages Snippet

bakarus wrote: I did add that to act.h, per the text file, here's the code:

Code:
/* Utility Functions */ /** @todo Move to a utility library */ char *find_exdesc(char *word, struct extra_descr_data *list); /** @todo Move to a mud centric string utility library */ void space_to_minus(char *str); /** @todo Move to a help module? */ int search_help(const char *argument, int level); void free_history(struct char_data *ch, int type); void free_recent_players(void); void check_newbie(void); /* functions with subcommands */ /* do_commands */ ACMD(do_commands);


In your comm.c file is
Code:
#include "act.h"

included with the rest of them?

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

More
29 Jul 2012 08:25 #469 by Liko
Replied by Liko on topic Re: Newbie Messages Snippet
Well I'm going to rewrite the steps more easily.

[::ACT.INFORMATIVE.C::]

1. Find ACMD(do_toggle) and under {"screenwidth", 0, 0, "\n", "\n"},
add:
Code:
{"newbie", PRF_NEWBIE, 0, "You will no longer see newbie messages.\r\n", "You will now see newbie messages.\r\n"},

2. Scroll a little farther down and under " Color: %s\r\n", add:
Code:
" Newbie Disp: %-3s\r\n",

3. Scroll down and under types[COLOR_LEV(ch)], add:
Code:
ONOFF(PRF_FLAGGED(ch, PRF_NEWBIE)));

4. That's all for do_toggle now go to the end of your act.informative.c file and add:
Code:
void check_newbie(void) { struct char_data *i, *next_char; int message; /* characters */ for (i = character_list; i; i = next_char) { next_char = i->next; if (PRF_FLAGGED(i, PRF_NEWBIE) && !PLR_FLAGGED(i, PLR_WRITING)) { message = rand_number(1, 6); if (message == 1) send_to_char(i, "Automatic Newbie Help: Test Message! a\r\n"); if (message == 2) send_to_char(i, "Automatic Newbie Help: Test Message! b \r\n"); if (message == 3) send_to_char(i, "Automatic Newbie Help: Test Message! c\r\n"); if (message == 4) send_to_char(i, "Automatic Newbie Help: Test Message! d\r\n"); if (message == 5) send_to_char(i, "Automatic Newbie Help: Test Message! e\r\n"); if (message == 6) send_to_char(i, "Automatic Newbie Help: Test Message! f\r\n"); } } }

5. Close act.informative.c and open

[::ACT.H::]

6. Find void free_recent_players(void) and under it add:
Code:
void check_newbie(void);

7. Close act.h

8. open

[[:::COMM.C:::]

9. Search check_timed_quests and under add:
Code:
check_newbie();

10. close comm.c

11. open

[[:::STRUCTS.H:::::]

12. search PRF_AUTODOOR and under it add:
Code:
#define PRF_NEWBIE XX /* Display Newbie Messages*/

13. Change #define NUM_PRF_FLAGS to
Code:
#define NUM_PRF_FLAGS XX

*Note: Change your XX's to your next available slot.

14. close structs.h

15. open

[[:::CONSTANTS.C::::]

16. search "AUTODOOR" and under it add:
Code:
"D_NEWBIE",

17. close constants.c

18. Make.

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

More
29 Jul 2012 15:57 #470 by bakarus
Replied by bakarus on topic Re: Newbie Messages Snippet
adding #include "act.h" to comm.c causes a ton of errors when i 'make' not sure how to proceed.

Please Log in or Create an account to join the conversation.

More
29 Jul 2012 18:55 #471 by Liko
Replied by Liko on topic Re: Newbie Messages Snippet

bakarus wrote: adding #include "act.h" to comm.c causes a ton of errors when i 'make' not sure how to proceed.


Copy and paste the make errors.

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

More
30 Jul 2012 20:46 #483 by bakarus
Replied by bakarus on topic Re: Newbie Messages Snippet
when i add #include "act.h" in comm.c these are the warnings/errors i get.


utils.h:45: error: expected ')' before 'vektor'
utils.h:50: warning: 'struct time_info_data' declared inside parameter list
utils.h:50: warning: its scope is only this definition or declaration, which is probably not what you want
utils.h:51: warning: 'struct char_data' declared inside parameter list
utils.h:52: warning: 'struct room_data' declared inside parameter list
utils.h:55: error: expected ')' before 'room'
utils.h:60: error: expected declaration specifiers or '...' before 'bool'
utils.h:60: warning: 'struct char_data' declared inside parameter list
utils.h:66: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'atoi dx'
utils.h:69: warning: 'struct affected_type' declared inside parameter list
utils.h:108: warning: 'struct char_data' declared inside parameter list
utils.h:109: warning: 'struct char_data' declared inside parameter list
utils.h:110: warning: 'struct char_data' declared inside parameter list
utils.h:111: warning: 'struct char_data' declared inside parameter list
utils.h:112: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cir cle_follow'
utils.h:115: warning: 'struct char_data' declared inside parameter list
utils.h:116: warning: 'struct char_data' declared inside parameter list
utils.h:119: warning: 'struct char_data' declared inside parameter list
utils.h:120: warning: 'struct char_data' declared inside parameter list
utils.h:123: warning: 'struct char_data' declared inside parameter list
utils.h:124: warning: 'struct char_data' declared inside parameter list
utils.h:125: warning: 'struct char_data' declared inside parameter list
utils.h:126: warning: 'struct char_data' declared inside parameter list
utils.h:127: warning: 'struct char_data' declared inside parameter list
utils.h:128: warning: 'struct char_data' declared inside parameter list
utils.h:129: warning: 'struct char_data' declared inside parameter list
utils.h:131: warning: 'struct char_data' declared inside parameter list
utils.h:133: warning: 'struct char_data' declared inside parameter list
utils.h:134: warning: 'struct char_data' declared inside parameter list
utils.h:135: warning: 'struct char_data' declared inside parameter list
utils.h:136: warning: 'struct char_data' declared inside parameter list
utils.h:139: warning: 'struct char_data' declared inside parameter list
utils.h:141: warning: 'struct char_data' declared inside parameter list
In file included from comm.c:15:
act.h:28: warning: 'struct char_data' declared inside parameter list
act.h:36: warning: 'struct char_data' declared inside parameter list
act.h:40: warning: 'struct char_data' declared inside parameter list
act.h:44: warning: 'struct char_data' declared inside parameter list
act.h:45: warning: 'struct char_data' declared inside parameter list
act.h:46: warning: 'struct char_data' declared inside parameter list
act.h:47: warning: 'struct char_data' declared inside parameter list
act.h:48: warning: 'struct char_data' declared inside parameter list
act.h:49: warning: 'struct char_data' declared inside parameter list
act.h:55: warning: 'struct extra_descr_data' declared inside parameter list
act.h:60: warning: 'struct char_data' declared inside parameter list
act.h:65: warning: 'struct char_data' declared inside parameter list
act.h:70: warning: 'struct char_data' declared inside parameter list
act.h:84: warning: 'struct char_data' declared inside parameter list
act.h:88: warning: 'struct char_data' declared inside parameter list
act.h:89: warning: 'struct char_data' declared inside parameter list
act.h:90: warning: 'struct char_data' declared inside parameter list
act.h:91: warning: 'struct char_data' declared inside parameter list
act.h:92: warning: 'struct char_data' declared inside parameter list
act.h:93: warning: 'struct char_data' declared inside parameter list
act.h:94: warning: 'struct char_data' declared inside parameter list
act.h:95: warning: 'struct char_data' declared inside parameter list
act.h:96: warning: 'struct char_data' declared inside parameter list
act.h:97: warning: 'struct char_data' declared inside parameter list
act.h:98: warning: 'struct char_data' declared inside parameter list
act.h:99: warning: 'struct char_data' declared inside parameter list
act.h:100: warning: 'struct char_data' declared inside parameter list
act.h:101: warning: 'struct char_data' declared inside parameter list
act.h:102: warning: 'struct char_data' declared inside parameter list
act.h:103: warning: 'struct char_data' declared inside parameter list
act.h:104: warning: 'struct char_data' declared inside parameter list
act.h:105: warning: 'struct char_data' declared inside parameter list
act.h:106: warning: 'struct char_data' declared inside parameter list
act.h:107: warning: 'struct char_data' declared inside parameter list
act.h:114: warning: 'struct obj_data' declared inside parameter list
act.h:114: warning: 'struct char_data' declared inside parameter list
act.h:115: warning: 'struct obj_data' declared inside parameter list
act.h:116: warning: 'struct obj_data' declared inside parameter list
act.h:117: warning: 'struct obj_data' declared inside parameter list
act.h:120: warning: 'struct char_data' declared inside parameter list
act.h:125: warning: 'struct char_data' declared inside parameter list
act.h:131: warning: 'struct char_data' declared inside parameter list
act.h:135: warning: 'struct char_data' declared inside parameter list
act.h:136: warning: 'struct char_data' declared inside parameter list
act.h:137: warning: 'struct char_data' declared inside parameter list
act.h:138: warning: 'struct char_data' declared inside parameter list
act.h:139: warning: 'struct char_data' declared inside parameter list
act.h:140: warning: 'struct char_data' declared inside parameter list
act.h:141: warning: 'struct char_data' declared inside parameter list
act.h:142: warning: 'struct char_data' declared inside parameter list
act.h:143: warning: 'struct char_data' declared inside parameter list
act.h:144: warning: 'struct char_data' declared inside parameter list
act.h:145: warning: 'struct char_data' declared inside parameter list
act.h:147: warning: 'struct obj_data' declared inside parameter list
act.h:147: warning: 'struct char_data' declared inside parameter list
act.h:148: warning: 'struct obj_data' declared inside parameter list
act.h:148: warning: 'struct char_data' declared inside parameter list
act.h:149: warning: 'struct char_data' declared inside parameter list
act.h:151: error: expected declaration specifiers or '...' before 'bool'
act.h:152: error: 'MAX_STRING_LENGTH' undeclared here (not in a function)
act.h:161: warning: 'struct char_data' declared inside parameter list
act.h:168: warning: 'struct char_data' declared inside parameter list
act.h:169: warning: 'struct char_data' declared inside parameter list
act.h:170: warning: 'struct char_data' declared inside parameter list
act.h:171: warning: 'struct char_data' declared inside parameter list
act.h:172: warning: 'struct char_data' declared inside parameter list
act.h:173: warning: 'struct char_data' declared inside parameter list
act.h:174: warning: 'struct char_data' declared inside parameter list
act.h:175: warning: 'struct char_data' declared inside parameter list
act.h:176: warning: 'struct char_data' declared inside parameter list
act.h:188: warning: 'struct char_data' declared inside parameter list
act.h:191: warning: 'struct char_data' declared inside parameter list
act.h:192: warning: 'struct char_data' declared inside parameter list
act.h:193: warning: 'struct char_data' declared inside parameter list
act.h:194: warning: 'struct char_data' declared inside parameter list
act.h:195: warning: 'struct char_data' declared inside parameter list
act.h:196: warning: 'struct char_data' declared inside parameter list
act.h:197: warning: 'struct char_data' declared inside parameter list
act.h:198: warning: 'struct char_data' declared inside parameter list
act.h:199: warning: 'struct char_data' declared inside parameter list
act.h:206: warning: 'struct char_data' declared inside parameter list
act.h:242: warning: 'struct char_data' declared inside parameter list
act.h:246: warning: 'struct char_data' declared inside parameter list
act.h:251: warning: 'struct char_data' declared inside parameter list
act.h:252: warning: 'struct char_data' declared inside parameter list
act.h:253: warning: 'struct char_data' declared inside parameter list
act.h:254: warning: 'struct char_data' declared inside parameter list
act.h:255: warning: 'struct char_data' declared inside parameter list
act.h:256: warning: 'struct char_data' declared inside parameter list
act.h:257: warning: 'struct char_data' declared inside parameter list
act.h:258: warning: 'struct char_data' declared inside parameter list
act.h:259: warning: 'struct char_data' declared inside parameter list
act.h:260: warning: 'struct char_data' declared inside parameter list
act.h:261: warning: 'struct char_data' declared inside parameter list
act.h:262: warning: 'struct char_data' declared inside parameter list
act.h:263: warning: 'struct char_data' declared inside parameter list
act.h:264: warning: 'struct char_data' declared inside parameter list
act.h:273: warning: 'struct social_messg' declared inside parameter list
act.h:279: warning: 'struct char_data' declared inside parameter list
act.h:280: warning: 'struct char_data' declared inside parameter list
act.h:291: warning: 'struct char_data' declared inside parameter list
act.h:292: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'find_ target_room'
act.h:293: warning: 'struct char_data' declared inside parameter list
act.h:294: warning: 'struct char_data' declared inside parameter list
act.h:295: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'chang e_player_name'
act.h:296: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'AddRe centPlayer'
act.h:299: warning: 'struct char_data' declared inside parameter list
act.h:303: warning: 'struct char_data' declared inside parameter list
act.h:307: warning: 'struct char_data' declared inside parameter list
act.h:310: warning: 'struct char_data' declared inside parameter list
act.h:314: warning: 'struct char_data' declared inside parameter list
act.h:323: warning: 'struct char_data' declared inside parameter list
act.h:324: warning: 'struct char_data' declared inside parameter list
act.h:325: warning: 'struct char_data' declared inside parameter list
act.h:326: warning: 'struct char_data' declared inside parameter list
act.h:327: warning: 'struct char_data' declared inside parameter list
act.h:328: warning: 'struct char_data' declared inside parameter list
act.h:329: warning: 'struct char_data' declared inside parameter list
act.h:330: warning: 'struct char_data' declared inside parameter list
act.h:331: warning: 'struct char_data' declared inside parameter list
act.h:332: warning: 'struct char_data' declared inside parameter list
act.h:333: warning: 'struct char_data' declared inside parameter list
act.h:334: warning: 'struct char_data' declared inside parameter list
act.h:335: warning: 'struct char_data' declared inside parameter list
act.h:336: warning: 'struct char_data' declared inside parameter list
act.h:337: warning: 'struct char_data' declared inside parameter list
act.h:338: warning: 'struct char_data' declared inside parameter list
act.h:339: warning: 'struct char_data' declared inside parameter list
act.h:340: warning: 'struct char_data' declared inside parameter list
act.h:341: warning: 'struct char_data' declared inside parameter list
act.h:342: warning: 'struct char_data' declared inside parameter list
act.h:343: warning: 'struct char_data' declared inside parameter list
act.h:344: warning: 'struct char_data' declared inside parameter list
act.h:345: warning: 'struct char_data' declared inside parameter list
act.h:346: warning: 'struct char_data' declared inside parameter list
act.h:347: warning: 'struct char_data' declared inside parameter list
act.h:348: warning: 'struct char_data' declared inside parameter list
act.h:349: warning: 'struct char_data' declared inside parameter list
act.h:350: warning: 'struct char_data' declared inside parameter list
act.h:351: warning: 'struct char_data' declared inside parameter list
act.h:352: warning: 'struct char_data' declared inside parameter list
act.h:353: warning: 'struct char_data' declared inside parameter list
act.h:354: warning: 'struct char_data' declared inside parameter list
act.h:355: warning: 'struct char_data' declared inside parameter list
act.h:356: warning: 'struct char_data' declared inside parameter list
act.h:357: warning: 'struct char_data' declared inside parameter list
act.h:358: warning: 'struct char_data' declared inside parameter list
act.h:359: warning: 'struct char_data' declared inside parameter list
act.h:360: warning: 'struct char_data' declared inside parameter list
act.h:361: warning: 'struct char_data' declared inside parameter list
comm.c: In function 'copyover_recover':
comm.c:480: warning: passing argument 1 of 'look_at_room' from incompatible poin ter type
comm.c:483: warning: implicit declaration of function 'AddRecentPlayer'
comm.c: In function 'perform_act':
comm.c:2467: warning: implicit declaration of function 'room_is_dark'
make[1]: *** [comm.o] Error 1
make[1]: Leaving directory `/home/anauroch/bakarus/tbamud-3.63/src'
make: *** [all] Error 2

Please Log in or Create an account to join the conversation.

More
30 Jul 2012 21:32 #484 by Liko
Replied by Liko on topic Re: Newbie Messages Snippet
copy and paste the area where you put #include "act.h"

Randian(0.0.0)
Owner/Developer

Please Log in or Create an account to join the conversation.

Time to create page: 0.271 seconds