Quote:
Originally Posted by darkichou
i guys
i have the error : " the name 'face' doesn't exist the context".
what should i do to fix it?
|
add the face void. It's been posted a bunch of times on the forum already.
Simple explanation of voids:
Voids can be thought of a little bit like an equation. It lets you do the same thing over and over again without having to write the exact same code every time.
Example, adding an item to the server requires a significant amount of code. you have to set values for every stat the item has (itemid, itemuid, plus, progress, bless, enchant, gem1, gem2, position, color and anything else), you gotta save it to the database, you have to spawn it to the character and you gotta control how that's all done...
You could re-write the entire code for that EVERY TIME you want to add an item to a player but that would be stupid. Using a void you write the code once and then just invoke that code whenever you want to create an item and you provide it with the details it needs to run its "equation".... and by equation i mean function.
(I know anyone who knows terminology or coding is going to cringe, I am well aware that they are not equations, I just figured it might be a way to explain it easier to people)
Now, here's the face void you needed.
Code:
public static void Face(int Face, ClientSocket CSocket)
{
CSocket.Send(ConquerPacket.NPCTalk(2544, Face, 255, 4));
}
And since you will be asking, it goes in the bottom section of gameserver>handlers>npctalk.cs where all the other voids are (there won't be many if you are just starting out but they are most definitely there lol.
Hope that helps you out.