Jump to content

Jurislav

Members
  • Posts

    1
  • Joined

  • Last visited

    Never
  • Donations

    0.00 GBP 

Everything posted by Jurislav

  1. i made this script with scripdev2 , when i try compile it it gives me some errors. So i need help and is it script problem or something else. #include "precompiled.h" bool GossipHello_resetnpc(Player *player, Creature * _Creature) { Player->Add_Gossip_Item(7,"Want to reset(lvl-170 only)",Gossip_Sender_Main,1201) player->Send_Gossip_Menu(DEFAULT_GOSSIP_MASSAGE,_Creature->GetGUID()); return true; } void SenderDefaultMenu_resetnpc(Player *player, Creature * _Creature,uint32 action) { if (action == 1201) { if (player->GetLevel() == 170) { if (player->GetMoney() == 2500000) { player->Say("Im Fully reseted",LANG_UNIVERSAL); player->CLOSE_GOSSIP_MENU(); Player->ModifyMoney(-2500000); Player->GiveLevel(1); } else { player->Say("I must be level 170 to reset",LANG_UNIVERSAL); player->CLOSE_GOSSIP_MENU(); } } else { player->Say("I must have 250 gold to reset",LANG_UNIVERSAL); player->CLOSE_GOSSIP_MENU(); } } bool GossipSelect_resetnpc(Player *player, Creatur * _Creature, uint32 sender, uint32 action) { if (sender == GOSSIP_SENDER_MAIN) SendDefaultMenu_resetnpc(player,_Creature,action); return true; } void AddSC_resetnpc(); { Script *newscript; newscript = new Script; newscript ->Name = "resetnpc"; newscript ->pGossipHello = &GossipHello_resetnpc; newscript ->pGossipSelect = &GossipSelect_resetnpc; newscript ->registerSelf(); } and this error. 1>------ Build started: Project: ScriptDev2, Configuration: Release Win32 ------ 1>Extracting revision 1>Compiling... 1>resetnpc.cc 1>..\\scripts\\custom\\resetnpc.cc(4) : error C2143: syntax error : missing ';' before '->' 1>..\\scripts\\custom\\resetnpc.cc(4) : error C2143: syntax error : missing ';' before '->' 1>..\\scripts\\custom\\resetnpc.cc(13) : error C2039: 'GetLevel' : is not a member of 'Player' 1> c:\\mangos\\src\\src\\game\\Player.h(1037) : see declaration of 'Player' 1>..\\scripts\\custom\\resetnpc.cc(19) : error C2143: syntax error : missing ';' before '->' 1>..\\scripts\\custom\\resetnpc.cc(19) : error C2143: syntax error : missing ';' before '->' 1>..\\scripts\\custom\\resetnpc.cc(20) : error C2143: syntax error : missing ';' before '->' 1>..\\scripts\\custom\\resetnpc.cc(20) : error C2143: syntax error : missing ';' before '->' 1>..\\scripts\\custom\\resetnpc.cc(34) : error C2061: syntax error : identifier 'Creatur' 1>..\\scripts\\custom\\resetnpc.cc(35) : error C2601: 'GossipSelect_resetnpc' : local function definitions are illegal 1> ..\\scripts\\custom\\resetnpc.cc(10): this line contains a '{' which has not yet been matched 1>..\\scripts\\custom\\resetnpc.cc(47) : error C2440: '=' : cannot convert from 'bool (__cdecl *)(Player *)' to 'bool (__cdecl *)(Player *,Creature *,uint32,uint32)' 1> This conversion requires a reinterpret_cast, a C-style cast or function-style cast 1>..\\scripts\\custom\\resetnpc.cc(48) : error C2039: 'registerSelf' : is not a member of 'Script' 1> c:\\mangos\\src\\src\\bindings\\scriptdev2\\include\\../ScriptMgr.h(28) : see declaration of 'Script' 1>..\\scripts\\custom\\resetnpc.cc(52) : fatal error C1075: end of file found before the left brace '{' at '..\\scripts\\custom\\resetnpc.cc(10)' was matched 1>Build log was saved at "file://c:\\Mangos\\src\\src\\bindings\\ScriptDev2\\VC90\\ScriptDev2__Win32_Release\\BuildLog.htm" 1>ScriptDev2 - 12 error(s), 0 warning(s) ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ========== again thx in adv. And sry for long post just dont know how to insert it in code snipet.
×
×
  • Create New...

Important Information

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. Privacy Policy Terms of Use