Welcome to the Builder Academy

Question Where guard

More
08 Jan 2025 21:46 #10512 by thomas
Replied by thomas on topic Where guard
Your line 243 has a comma too much (the last row before the ending parenthesis does not need one).
So instead of
ONOFF(PRF_FLAGGED(ch, PRF_VERBOSE)),
in this last position in the list, use
ONOFF(PRF_FLAGGED(ch, PRF_VERBOSE))


This line:
" Verbose: %-3s%s ",
should be
" Verbose: %-3s ",
or
" Verbose: %-3s \r\n",

since you only have one element more (the "on" or "off" from the ONOFF macro) - each %s or %-3s corresponds to a value in the list.

> I'm not a programmer. I'm just a teacher trying to make some young guys with ADHD have fun.

Commendable :) I'll try to help you out here. I've been on a business trip the last couple of days though.

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

More
08 Jan 2025 22:12 #10514 by JTP
Replied by JTP on topic Where guard
still get this after the recomendations:

act.informative.c: In function ‘do_toggle’:
act.informative.c:2343: error: expected ‘)’ before ‘}’ token
act.informative.c:2343: warning: format ‘%-3s’ expects type ‘char *’, but argument 3 has type ‘int’
act.informative.c:2343: error: expected ‘;’ before ‘}’ token

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

More
08 Jan 2025 22:19 - 08 Jan 2025 22:21 #10515 by JTP
Replied by JTP on topic Where guard
ok last line had to get an extra ) and ;

now it compiled perfectly


LEt me test it and see how it is
Last edit: 08 Jan 2025 22:21 by JTP.

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

More
08 Jan 2025 22:30 - 08 Jan 2025 23:06 #10516 by JTP
Replied by JTP on topic Where guard
Ok first tests looks good

where guard shows all the guards, this is just 1 line:

M  1. Sentri                    - [55665] Hallway                  [T55561]

But why does it show the trigger the mob has after the room name, any idea why ?

It’s not a room trigger, its the mobs trigger.




And I wasn't able to put this into the code because I had nothing like it:

    if (GET_LEVEL(PREFEDIT_GET_CHAR) == LVL_IMPL)  <<< I didn't have this line
pr
-      send_to_char(d->character, "%s7%s) Zone Resets  %s[%s%3s%s]\r\n",   <<< Or Zone Reset
+      send_to_char(d->character, "%s8%s) Zone Resets  %s[%s%3s%s]\r\n",
            CBYEL(d->character, C_NRM), CCNRM(d->character, C_NRM), CCCYN(d->character, C_NRM), CCYEL(d->character, C_NRM),
            ONOFF(PREFEDIT_FLAGGED(PRF_ZONERESETS)), CCCYN(d->character, C_NRM));
+    else
+      send_to_char(d->character, "\r\n");


It kinda would be cool to see when the zones resests
Last edit: 08 Jan 2025 23:06 by JTP.

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

Time to create page: 0.251 seconds