Creating skills with sset is pretty straightforward if, like Zeno said, you have a code function to map it to. If you want to do it without a new do_function, it works kind of like spells. What problems are you having specifically?
ok, now i have a problem with...
act( AT_TELL, MXPTAG ("player $n") "$n" MXPTAG ("/player")
it says parse error before string constant when i try to compile
Please use the [code] tag when posting so many lines of code. Not having the lines formatted correctly makes them irritating to read. And please post the compiler output, also using the [code] tag, so that we can know exactly what the compiler is saying -- and then use comments in the code to indicate which line is which. (Don't post the code again, just edit your previous posts)
This kind of problem is very easy to find if code is indented properly. If you're using vi, go to the top of the function and type =a{. That means format the current block of code.
It will then be immediately apparent where the braces are missing.
You can also put the cursor over a brace, and press % to jump to the matching brace. If you do that and find yourself somewhere you didn't expect, then you have too many/too few braces.
The '%' command only works when you have your cursor over a brace.
Also, Nick suggested using vi's bracket highlighting feature. This is a very good idea. To enable this you might have to type the command ":syntax enable". It should then start highlighting mismatched braces.
I'm not sure how else to solve your problem, really. Basically you have to go find which brace doesn't have a matching brace. It's probably going to be in code you added.
int main ()
{ // <------ "A"
printf ("hello, world\n");
return 0;
{ // <------ "B"
} // <------ "C"
If I edit this in vi and put the cursor on the "{" in line "A", and hit the % symbol, the cursor doesn't move. This is wrong because I expect it to move to the end of the function.
However if I move the cursor to where I believe the end of the function to be (line C) and hit % the cursor jumps back to line B. This is where the extra bracket is.
(Almost) every C program is going to consist of functions which generally look like this:
void function_name (arguments)
{
..... body of function here .....
}
void some_other_function (arguments)
{
..... body of function here .....
}
The word "void" in the example above will be the function return value, which might be "int" or something else (like "bool").
However the basic structure is the same.
You should be able to spot them because of indentation, comments, blank lines, and general source structure. Now in each case you should be able to put the cursor on the first "{" and hit "%" (in vi) and the cursor will move to the final "}" symbol. (And vice-versa, put the cursor on the final "}" and hit "%" and it will move to the first "{").
If that doesn't happen, you have found the function with the problem with brackets.
the problem is i did that all the way through, with lining up the braces, :syntax enable, etc, but i didnt find anything, and i am highlighting a brace before i use the '%' command
Another possibility is a misplaced comment. In this example:
int main ()
{
printf ("hello, world\n");
return 0;
/*
}
*/
If I put the cursor on the final "}" and hit % it moves to the first "{".
However the compiler doesn't see it that way because the "}" is commented out.
All I can suggest is go back to the working version, and slowly add your changes back in. The block of changes that causes the message is the cause of the problem. Look carefully in that for a misplaced comment or extra or missing brace.
Look in fight.c. The function damage is what deals the damage. It computes the final number. Find the part where it deals the damage. Add a function call to print a string, formatted however you like it. Voila, all done.
But again, may I suggest that you fix your brace problem before moving on to other things? By adding changes without making sure things work first, you run a very strong risk of breaking things even more and having a hard time of fixing it. And now, you have an especially pressing case, because your code doesn't even compile.
i fixed the brace thing, but now i have a problem with player.c
void do_inventory( CHAR_DATA *ch, char *argument )
{
set_char_color( AT_RED, ch );
send_to_char( "You are carrying:\n\r", ch );
show_list_to_char( ch->first_carrying, ch, TRUE, TRUE, eItemDrop ); /* the compiler says for this line says eItemDrop, first time it is declared, and it says too many arguments for the function show_list_to_char */
return;
}
ok now it is giving me undefined _crypt, undefined _RENAME, and undefinded _bigregex errors after everything is made into the .o files.
And yes i went into the makefile file, and made the adjustments the comments suggested that i do.
i found out it is just a qwerk with the widows source code, but anyway, im having variable declaring problems, how would i declare a boolean variable called suppress, and then set it to FALSE