Zdravím udělal sem si Vendora v C++ jenomže ho neumím opravit
Kód:
#include "ScriptPCH.h"

class starter_item_vendor : public CreatureScript
{
public:
	starter_item_vendor() : CreatureScript("starter_item_vendor") { }

	bool OnGossipHello(Player *player, Creature *_creature)
	{
		// warrior
		if(player->getClass() == 1)
		{
			player->ADD_GOSSIP_ITEM ( 0, "Give me TYPE Bags!"		, GOSSIP_SENDER_MAIN, 1101);
			player->ADD_GOSSIP_ITEM ( 0, "Give me Requiens Item!"		, GOSSIP_SENDER_MAIN, 1102);
		}
		// paladin
		if(player->getClass() == 2)
		{
			player->ADD_GOSSIP_ITEM ( 0, "Give me TYPE Bags!"	, GOSSIP_SENDER_MAIN, 1201);
			player->ADD_GOSSIP_ITEM ( 0, "Give me Requiens Item!"		, GOSSIP_SENDER_MAIN, 1202);
		}
		//hunter
		if(player->getClass() == 3)
		{
			player->ADD_GOSSIP_ITEM ( 0, "Give me TYPE Bags!"			, GOSSIP_SENDER_MAIN, 1301);
			player->ADD_GOSSIP_ITEM ( 0, "Give me Requiens Item!"			, GOSSIP_SENDER_MAIN, 1302);
			
		}
		//rogue
		if(player->getClass() == 4)
		{
			player->ADD_GOSSIP_ITEM ( 0, "Give me TYPE Bags!"			, GOSSIP_SENDER_MAIN, 1401);
			player->ADD_GOSSIP_ITEM ( 0, "Give me Requiens Item!"			, GOSSIP_SENDER_MAIN, 1402);
		}
		//priest
		if(player->getClass() == 5)
		{
			player->ADD_GOSSIP_ITEM ( 0, "Give me TYPE Bags!"	, GOSSIP_SENDER_MAIN, 1501);
			player->ADD_GOSSIP_ITEM ( 0, "Give me Requiens Item!"	, GOSSIP_SENDER_MAIN, 1502);
		}
		
		// shaman
		if(player->getClass() == 6)
		{
			player->ADD_GOSSIP_ITEM ( 0, "Give me TYPE Bags And Totem!"	, GOSSIP_SENDER_MAIN, 1701);
			player->ADD_GOSSIP_ITEM ( 0, "Give me Requiens Item!"	, GOSSIP_SENDER_MAIN, 1702);
		}
		// mage
		if(player->getClass() == 7)
		{
			player->ADD_GOSSIP_ITEM ( 0, "Give me TYPE Bags!"			, GOSSIP_SENDER_MAIN, 1801);
			player->ADD_GOSSIP_ITEM ( 0, "Give me Requiens Item!"			, GOSSIP_SENDER_MAIN, 1802);
		}
		// warlock
		if(player->getClass() == 8)
		{
			player->ADD_GOSSIP_ITEM ( 0, "Give me TYPE Bags!"			, GOSSIP_SENDER_MAIN, 1901);
			player->ADD_GOSSIP_ITEM ( 0, "Give me Requiens Item!"			, GOSSIP_SENDER_MAIN, 1902);
		}
		// druid
		if(player->getClass() == 9)
		{
			player->ADD_GOSSIP_ITEM ( 0, "Give me TYPE Bags!"	, GOSSIP_SENDER_MAIN, 1001);
			player->ADD_GOSSIP_ITEM ( 0, "Give me Requiens Item!"	, GOSSIP_SENDER_MAIN, 1002);
		}
       if(player->getClass() == 0)
		{
			player->ADD_GOSSIP_ITEM ( 0, "Give me Bullet!"		, GOSSIP_SENDER_MAIN, 1991);
			player->ADD_GOSSIP_ITEM ( 0, "Give me Arows!"		, GOSSIP_SENDER_MAIN, 1992);
		}
		 player->SEND_GOSSIP_MENU(DEFAULT_GOSSIP_MESSAGE, _creature->GetGUID());         
         return true;
	}

	 bool OnGossipSelect(Player *player, Creature *_creature, uint32 sender, uint32 uiAction)
	 {
		 player->PlayerTalkClass->ClearMenus();
		 switch(uiAction)
		 {
		 case 1101:
			 {
			 player->SendNewItem(23162, 4);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;
			 case 1102:
			 {
			 player->SendNewItem(21215, 200);
			 player->SendNewItem(17033, 200);
			 player->SendNewItem(21177, 200);
			 player->SendNewItem(21177, 200);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;
		 case 1201:
			 {
			 player->SendNewItem(23162,4);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;
			 case 1202:
			 {
			 player->SendNewItem(21215,200);
			 
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;
		 
		 case 1301:
			 {
			 player->SendNewItem(23162,3);
			 player->SendNewItem(18714,1);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;
		case 1302:
			 {
			 player->SendNewItem(21215,200);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;

		 case 1401:
			 {
			 player->SendNewItem(23162,4);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;
		 case 1402:
			 {
			 player->SendNewItem(21215,200);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;

		 case 1501:
			 {
			 player->SendNewItem(23162,4);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;
		 case 1502:
			 {
			 player->SendNewItem(17029,200);
			 player->SendNewItem(17028,200);
			 player->SendNewItem(17056,200);
			 player->SendNewItem(21215,200);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;

		case 1701:
			 {
			 player->SendNewItem(23162,4);
			 player->SendNewItem(5178,1);
			 player->SendNewItem(5175,1);
			 player->SendNewItem(5176,1);
			 player->SendNewItem(5177,1);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;
		case 1702:
			 {
			 player->SendNewItem(17057,200);
			 player->SendNewItem(17030,200);
			 player->SendNewItem(17058,200);
			 player->SendNewItem(21215,200);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;
		 case 1801:
			 {
			 player->SendNewItem(23162,4);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;
		case 1802:
			 {
			 player->SendNewItem(17056,200);
			 player->SendNewItem(17031,200);
			 player->SendNewItem(17032,200);
			 player->SendNewItem(17056,200);
			 player->SendNewItem(21215,200);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;

		 case 1901:
			 {
			 player->SendNewItem(23162,4);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;
		 case 1902:
			 {
			 player->SendNewItem(16583,200);
			 player->SendNewItem(5565,200);
			 player->SendNewItem(6265,200);
			 player->SendNewItem(21215,200);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;

		case 1001:
			 {
			 player->SendNewItem(23162,4);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;
		case 1002:
			 {
			 player->SendNewItem(22148,200);
			 player->SendNewItem(22147,200);
			 player->SendNewItem(21215,200);
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;
		case 1991:
			 {
			 player->SendNewItem(280061,200);
			 
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;
		case 1992:
			 {
			 player->SendNewItem(280056,200);
			 
			 player->CLOSE_GOSSIP_MENU();
			 }
			 break;

			 }
	 return true;
	 }

};

void AddSC_starter_item_vendor()
{
	new starter_item_vendor();
}
A dává to erory
Kód:
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:4: error: exp ected class-name before â{â token
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp: In construct or âstarter_item::starter_item()â:
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:6: error: cla ss âstarter_itemâ does not have any field named âCreatureScriptâ
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp: In member fu nction âbool starter_item::OnGossipSelect(Player*, Creature*, uint32, uint32)â:
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:82: error: no matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:88: error: no matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:89: error: no matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:90: error: no matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:91: error: no matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:97: error: no matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:103: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:111: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:112: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:118: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:125: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:131: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:138: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:144: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:145: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:146: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:147: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:154: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:155: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:156: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:157: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:158: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:164: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:165: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:166: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:167: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:173: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:179: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:180: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:181: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:182: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:183: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:190: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:196: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:197: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:198: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:199: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:206: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:212: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:213: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:214: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:220: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
/home/deremi/oregon/build/oregoncore/src/scripts/Custom/vendor.cpp:227: error: n o matching function for call to âPlayer::SendNewItem(int, int)â
/home/deremi/oregon/build/oregoncore/src/game/Player.h:1094: note: candidates ar e: void Player::SendNewItem(Item*, uint32, bool, bool, bool)
make[2]: *** [src/scripts/CMakeFiles/scripts.dir/Custom/vendor.cpp.o] Error 1
make[1]: *** [src/scripts/CMakeFiles/scripts.dir/all] Error 2
make: *** [all] Error 2
Zde je Player.h http://code.google.com/p/oregoncore/.../game/Player.h