C++ Help menu

User Tag List

Thread: C++ Help

Results 1 to 9 of 9
  1. #1
    Emanuel095's Avatar Active Member
    Reputation
    24
    Join Date
    Jul 2009
    Posts
    78
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    C++ Help

    Hello, im trying to do my first C++ script >_<
    This is my script:


    Code:
        By Emanuel095
    */
    
    #include "StdAfx.h"
    #include "Setup.h"
    #include "Base.h"
    
    #define Simon 55555
    #define LightningNova 59835
    
    class SimonAI : public ArcScriptCreatureAI
    {
    	ARCSCRIPT_FACTORY_FUNCTION(SimonAI, ArcScriptCreatureAI};
    	SimonAI(Creature* pCreature) : ArcScriptCreatureAI(pCreature)
    	{
    		AddEmote(Event_OncombatStart, "I will make this quick", Text_Yell, 0);
    		AddEmote(Event_OntargetDied, "That was easy!", Text_Yell, 0);
    		AddEmote(Event_OnDied, "Forgive me my masters!", Text_Yell, 0);
    
    		AddSpell(LightningNova, Target_Self, 30, 4.0, 20);
    	
    	} // End Spells/Events
    
    };
    void SetupCreatureAI(ScriptMgr * mgr)
    {
    	mgr->register_creature_script(Simon, &SimonAI::Create);
    }
    I get this error:

    Code:
    1>------ Build started: Project: ArcScriptInstanceScripts, Configuration: Debug Win32 ------
    1>Compiling...
    1>Instance_Uldaman.cpp
    1>Instance_TheUnderbog.cpp
    1>Instance_TheStockade.cpp
    1>Instance_TheSteamvault.cpp
    1>Instance_TheSlavePens.cpp
    1>Instance_TheShatteredHalls.cpp
    1>Instance_TheMechanar.cpp
    1>Instance_ShadowLabyrinth.cpp
    1>Instance_ShadowfangKeep.cpp
    1>Instance_SethekkHalls.cpp
    1>Instance_Scholomance.cpp
    1>Instance_ScarletMonastery.cpp
    1>Instance_RazorfenDowns.cpp
    1>Instance_RagefireChasm.cpp
    1>Instance_OldHillsbradFoothills.cpp
    1>Instance_Mauradon.cpp
    1>Instance_ManaTombs.cpp
    1>Instance_MagistersTerrace.cpp
    1>Instance_HellfireRamparts.cpp
    1>Instance_DireMaul.cpp
    1>Generating Code...
    1>Compiling...
    1>Instance_Deadmines.cpp
    1>Instance_Botanica.cpp
    1>Instance_BloodFurnace.cpp
    1>Instance_BlackrockSpire.cpp
    1>Instance_BlackrockDepths.cpp
    1>Instance_BlackMorass.cpp
    1>Instance_AuchenaiCrypts.cpp
    1>Instance_Arcatraz.cpp
    1>GenericAI.cpp
    1>Event_DarkPortal.cpp
    1>Creature.cpp
    1>..\src\InstanceScripts\Creature.cpp(14) : fatal error C1057: unexpected end of file in macro expansion
    1>Base.cpp
    1>Generating Code...
    1>Build log was saved at "file://c:\Users\Emanuel\Desktop\Server\Arcemu Source\src\scripts\projects\2008_int_debug_instancescripts\BuildLog.htm"
    1>ArcScriptInstanceScripts - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    Please help me fix the problem, tryed for 4 hours now :S
    Last edited by Emanuel095; 10-11-2009 at 04:17 AM.

    C++ Help
  2. #2
    Sounddead's Avatar Contributor
    Reputation
    160
    Join Date
    Sep 2007
    Posts
    1,126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You only showed the last [art of the output log. You gotta show the entire thing.

    I live in a shoe

  3. #3
    Emanuel095's Avatar Active Member
    Reputation
    24
    Join Date
    Jul 2009
    Posts
    78
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    1>------ Build started: Project: ArcScriptInstanceScripts, Configuration: Debug Win32 ------
    1>Compiling...
    1>Instance_Uldaman.cpp
    1>Instance_TheUnderbog.cpp
    1>Instance_TheStockade.cpp
    1>Instance_TheSteamvault.cpp
    1>Instance_TheSlavePens.cpp
    1>Instance_TheShatteredHalls.cpp
    1>Instance_TheMechanar.cpp
    1>Instance_ShadowLabyrinth.cpp
    1>Instance_ShadowfangKeep.cpp
    1>Instance_SethekkHalls.cpp
    1>Instance_Scholomance.cpp
    1>Instance_ScarletMonastery.cpp
    1>Instance_RazorfenDowns.cpp
    1>Instance_RagefireChasm.cpp
    1>Instance_OldHillsbradFoothills.cpp
    1>Instance_Mauradon.cpp
    1>Instance_ManaTombs.cpp
    1>Instance_MagistersTerrace.cpp
    1>Instance_HellfireRamparts.cpp
    1>Instance_DireMaul.cpp
    1>Generating Code...
    1>Compiling...
    1>Instance_Deadmines.cpp
    1>Instance_Botanica.cpp
    1>Instance_BloodFurnace.cpp
    1>Instance_BlackrockSpire.cpp
    1>Instance_BlackrockDepths.cpp
    1>Instance_BlackMorass.cpp
    1>Instance_AuchenaiCrypts.cpp
    1>Instance_Arcatraz.cpp
    1>GenericAI.cpp
    1>Event_DarkPortal.cpp
    1>Creature.cpp
    1>..\src\InstanceScripts\Creature.cpp(14) : fatal error C1057: unexpected end of file in macro expansion
    1>Base.cpp
    1>Generating Code...
    1>Build log was saved at "file://c:\Users\Emanuel\Desktop\Server\Arcemu Source\src\scripts\projects\2008_int_debug_instancescripts\BuildLog.htm"
    1>ArcScriptInstanceScripts - 1 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  4. #4
    Sounddead's Avatar Contributor
    Reputation
    160
    Join Date
    Sep 2007
    Posts
    1,126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    And your script file name is Creature.cpp?
    If it is, double click on the line with the error in it and it will take you to where the compiler found the error.

    I live in a shoe

  5. #5
    Emanuel095's Avatar Active Member
    Reputation
    24
    Join Date
    Jul 2009
    Posts
    78
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes my script name is Creature.cpp? Does it make any trouble?
    It takes me to:




    class SimonAI : public ArcScriptCreatureAI
    {

    Dont understand :S

  6. #6
    Sounddead's Avatar Contributor
    Reputation
    160
    Join Date
    Sep 2007
    Posts
    1,126
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Everything looks right, but idk, i just smoked a j so im feeling a bit spacy.

    Someone that codes in the ArcScript shit will be here to help you soon im sure

    I live in a shoe

  7. #7
    Emanuel095's Avatar Active Member
    Reputation
    24
    Join Date
    Jul 2009
    Posts
    78
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ahh, okej
    Thanks anyway

  8. #8
    Link_S's Avatar Member
    Reputation
    125
    Join Date
    Dec 2008
    Posts
    293
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've never coded an ArcScript Creature before, can't really see why you don't use the CreatureAI instead, but anyhow. Try to rename your file.
    Why do I need a signature?

  9. #9
    Emanuel095's Avatar Active Member
    Reputation
    24
    Join Date
    Jul 2009
    Posts
    78
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tryed, nothing happend same error.
    CreatureAI?
    Im new to c++, you coulden't link a good guide for it?

Similar Threads

  1. Help WoW Fish-Bot
    By Eliteplague in forum World of Warcraft General
    Replies: 2
    Last Post: 12-10-2024, 05:46 PM
  2. HELP: Gold Scam Exploit
    By GoldDragon in forum World of Warcraft General
    Replies: 11
    Last Post: 01-23-2007, 07:26 PM
  3. Banner Ad Redesign help
    By Matt in forum Community Chat
    Replies: 57
    Last Post: 07-08-2006, 08:40 PM
  4. Hit points and talent points? Please help
    By hankusdankus in forum World of Warcraft General
    Replies: 6
    Last Post: 05-04-2006, 02:00 PM
  5. bot help
    By xwhitedeathx in forum World of Warcraft General
    Replies: 3
    Last Post: 05-01-2006, 03:50 AM
All times are GMT -5. The time now is 04:31 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search