Jump to content
External pictures are being replaced... ×
×
×
  • Create New...
  • 0

Problem with a function


lux

Question

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

  • Answers 1
  • Created
  • Last Reply

Top Posters For This Question

Popular Days

Top Posters For This Question

1 answer to this question

Recommended Posts

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.


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.