Im making this thing lol and im getting these errors what can i change teh words to to fix this thanks all!!
Code:
------ Build started: Project: PvpSystem, Configuration: Release Win32 ------
Compiling...
Setup.cpp
c:documents and settingsmarinedesktopascentbranches2_8_stablesrcscriptssrcpvpsystemSetup.h(1) : warning C4081: expected 'identifier'; found '('
..srcPvpSystemSetup.cpp(12) : error C2039: 'GetDamage' : is not a member of 'Player'
c:documents and settingsmarinedesktopascentbranches2_8_stablesrcgamePlayer.h(695) : see declaration of 'Player'
..srcPvpSystemSetup.cpp(12) : error C2065: 'Plr' : undeclared identifier
..srcPvpSystemSetup.cpp(12) : error C2227: left of '->GetAttacker' must point to class/struct/union/generic type
type is ''unknown-type''
..srcPvpSystemSetup.cpp(15) : error C2181: illegal else without matching if
..srcPvpSystemSetup.cpp(16) : error C2661: 'ItemInterface::SafeAddItem' : no overloaded function takes 1 arguments
..srcPvpSystemSetup.cpp(18) : error C2065: 'pVictim' : undeclared identifier
..srcPvpSystemSetup.cpp(18) : error C2227: left of '->IsPlayer' must point to class/struct/union/generic type
type is ''unknown-type''
..srcPvpSystemSetup.cpp(20) : error C2039: 'GetRace' : is not a member of 'Player'
c:documents and settingsmarinedesktopascentbranches2_8_stablesrcgamePlayer.h(695) : see declaration of 'Player'
..srcPvpSystemSetup.cpp(21) : warning C4390: ';' : empty controlled statement found; is this the intent?
..srcPvpSystemSetup.cpp(21) : warning C4305: 'argument' : truncation from 'double' to 'float'
..srcPvpSystemSetup.cpp(21) : warning C4305: 'argument' : truncation from 'double' to 'float'
..srcPvpSystemSetup.cpp(21) : warning C4305: 'argument' : truncation from 'double' to 'float'
..srcPvpSystemSetup.cpp(23) : error C2039: 'GetRace' : is not a member of 'Player'
c:documents and settingsmarinedesktopascentbranches2_8_stablesrcgamePlayer.h(695) : see declaration of 'Player'
..srcPvpSystemSetup.cpp(24) : warning C4390: ';' : empty controlled statement found; is this the intent?
..srcPvpSystemSetup.cpp(24) : warning C4305: 'argument' : truncation from 'double' to 'float'
..srcPvpSystemSetup.cpp(24) : warning C4305: 'argument' : truncation from 'double' to 'float'
..srcPvpSystemSetup.cpp(24) : warning C4305: 'argument' : truncation from 'double' to 'float'
..srcPvpSystemSetup.cpp(27) : error C2059: syntax error : 'else'
..srcPvpSystemSetup.cpp(28) : error C2447: '{' : missing function header (old-style formal list?)
..srcPvpSystemSetup.cpp(30) : error C2143: syntax error : missing ';' before '->'
..srcPvpSystemSetup.cpp(30) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
..srcPvpSystemSetup.cpp(31) : error C2143: syntax error : missing ';' before '.'
..srcPvpSystemSetup.cpp(31) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
..srcPvpSystemSetup.cpp(31) : error C2556: 'int Singleton<type>::getSingleton(void)' : overloaded function differs only by return type from 'World &Singleton<type>::getSingleton(void)'
with
[
type=World
]
c:Documents and SettingsMarineDesktopAscentbranches2_8_stablesrcsharedSingleton.h(49) : see declaration of 'Singleton<type>::getSingleton'
with
[
type=World
]
..srcPvpSystemSetup.cpp(31) : error C2040: 'Singleton<type>::getSingleton' : 'int (void)' differs in levels of indirection from 'World &(void)'
with
[
type=World
]
..srcPvpSystemSetup.cpp(32) : error C2059: syntax error : '}'
..srcPvpSystemSetup.cpp(32) : error C2143: syntax error : missing ';' before '}'
..srcPvpSystemSetup.cpp(32) : error C2059: syntax error : '}'
..srcPvpSystemSetup.cpp(34) : error C2143: syntax error : missing ';' before '{'
..srcPvpSystemSetup.cpp(34) : error C2447: '{' : missing function header (old-style formal list?)
Build log was saved at "file://c:Documents and SettingsMarineDesktopAscentbranches2_8_stablesrcscriptsprojects2003_int_release_PvpSystemBuildLog.htm"
PvpSystem - 22 error(s), 9 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Code:
#include "StdAfx.h"
#include "Setup.h"
#define Mark 40081
#define coords 0, 0, -7508.944336, -3478.615479, 170.880997, 0
#define coord 0, 0, -8323.146484, -3235.396484, 170.880997, 0
#define Item 40060
void onPvpKill(Player* attacker, Player* victim)
{
attacker->ModUInt32Value(PLAYER_FIELD_COINAGE, 50000);
// attacker->GetItemInterface()->SafeAddItem(510020, INVENTORY_SLOT_NOT_SET, 23); Add in this option if you want the attacker to gain an item. The item in this case is 510020.
if(attacker->GetDamage>100 && Plr->GetAttacker()==true)
{
if(attacker->GetItemInterface()->GetItemCount(Item))
else
;attacker->GetItemInterface()->SafeAddItem(Mark)
;if(attacker->GetItemInterface()->GetItemCount(Item) >= 1 && pVictim->IsPlayer())
{
if(attacker->GetRace==RACE_BLOODELF, RACE_ORC, RACE_UNDEAD, RACE_TAUREN, RACE_TROLL);
attacker->SafeTeleport(coord);
}
else if(attacker->GetRace==RACE_DRAENEI, RACE_NIGHTELF, RACE_HUMAN, RACE_GNOME, RACE_DWARF);
attacker->SafeTeleport(coords);
}
}
else
;{ attacker->SendBroadcastMessage("Death ;)!")
};
; victim->ModUInt32Value(PLAYER_FIELD_COINAGE, -20000);
; sWorld.SendWorldWideScreenText(%s has killed %s, attacker, victim);
}
extern "C" SCRIPT_DECL uint32 _exp_get_version()
{
return MAKE_SCRIPT_VERSION(SCRIPTLIB_VERSION_MAJOR, SCRIPTLIB_VERSION_MINOR);
}
extern "C" SCRIPT_DECL void _exp_script_register(ScriptMgr* mgr)
{
::sScriptMgr.register_hook(SERVER_HOOK_EVENT_ON_KILL_PLAYER, onPvpKill);
}