Jump to content

Problem with a function


Recommended Posts

Hey, hope some1 can help..

I need a function for spawn a effect for a "unique_vid" that is a mob/boss when i decide.. I write this (im so noob), but i have error on compile.

 

	int dungeon_unique_boss_effect(lua_State* L)
	{
		if (!lua_isstring(L, 1) || !lua_isstring(L, 2))
		{
			sys_err("invalid argument");
			return 0;
		}

		CQuestManager& q = CQuestManager::instance();
		LPDUNGEON pDungeon = q.GetCurrentDungeon();

		if (pDungeon)
		{

			LPCHARACTER boss_ch = pDungeon->GetUniqueVid(lua_tostring(L,1));
			if (NULL == boss_ch)
				return 0;
			
			if (lua_isstring(L, 2))
			{
				boss_ch->SpecificEffectPacket (lua_tostring(L, 2));
			}
			return 0;
		}
	}	

I get this error:

compile questlua_dungeon.cpp
questlua_dungeon.cpp: In function 'int quest::dungeon_unique_boss_effect(lua_State*)':
questlua_dungeon.cpp:512: error: invalid conversion from 'DWORD' to 'CHARACTER*'

 

Thanks in advance..

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.