Deprecated: The behavior of unparenthesized expressions containing both '.' and '+'/'-' will change in PHP 8: '+'/'-' will take a higher precedence in /home/iano/public_html/tpforums-vb5/forum/includes/class_core.php on line 5842

PHP Warning: Use of undefined constant MYSQL_NUM - assumed 'MYSQL_NUM' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_ASSOC - assumed 'MYSQL_ASSOC' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: Use of undefined constant MYSQL_BOTH - assumed 'MYSQL_BOTH' (this will throw an Error in a future version of PHP) in ..../includes/init.php on line 165

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 588

PHP Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in ..../includes/functions_navigation.php on line 612

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../global.php(29) : eval()'d code(6) : eval()'d code on line 1

PHP Warning: Use of undefined constant misc - assumed 'misc' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant index - assumed 'index' (this will throw an Error in a future version of PHP) in ..../includes/class_bootstrap.php(1422) : eval()'d code(4) : eval()'d code on line 1

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6

PHP Warning: Use of undefined constant onlinestatusphrase - assumed 'onlinestatusphrase' (this will throw an Error in a future version of PHP) in ..../includes/class_core.php(4684) : eval()'d code on line 6
[HELP] TibiaAPI.Dll import error.
Results 1 to 9 of 9

Thread: [HELP] TibiaAPI.Dll import error.

  1. #1
    Junior Member
    Join Date
    Aug 2010
    Posts
    29

    [HELP] TibiaAPI.Dll import error.

    Hi guys,

    I've been following the steps in readme.txt at the tibiaapi file.
    But now i got an problem when i try to run my blank project (i did not changed anything) i get many errors xD with tibia or something i will show maybe some1 can help me

    My code:

    [code=cpp]#pragma once

    namespace RealotsBot {

    using namespace System;
    using namespace System::ComponentModel;
    using namespace System::Collections;
    using namespace System::Windows::Forms;
    using namespace System:ata;
    using namespace System:rawing;
    using Tibia;
    using Tibia.Objects

    /// <summary>
    /// Summary for Form1
    /// </summary>
    public ref class Form1 : public System::Windows::Forms::Form
    {
    public:
    Form1(void)
    {
    InitializeComponent();
    //
    //TODO: Add the constructor code here
    //
    }

    protected:
    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    ~Form1()
    {
    if (components)
    {
    delete components;
    }
    }

    private:
    /// <summary>
    /// Required designer variable.
    /// </summary>
    System::ComponentModel::Container ^components;

    #pragma region Windows Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    void InitializeComponent(void)
    {
    this->SuspendLayout();
    //
    // Form1
    //
    this->AutoScaleDimensions = System:rawing::SizeF(6, 13);
    this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
    this->ClientSize = System:rawing::Size(284, 262);
    this->Name = L"Form1";
    this->Text = L"Form1";
    this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
    this->ResumeLayout(false);

    }
    #pragma endregion
    private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
    }
    };
    }[/code]

    Errors:
    Error 1 error C2873: 'Tibia' : symbol cannot be used in a using-declaration c:\users\acerkasper\documents\visual studio 2010\projects\realots\realotsbot\realotsbot\Form1. h 11
    Error 2 error C2143: syntax error : missing ';' before '.' c:\users\acerkasper\documents\visual studio 2010\projects\realots\realotsbot\realotsbot\Form1. h 12
    Error 3 error C2873: 'Tibia' : symbol cannot be used in a using-declaration c:\users\acerkasper\documents\visual studio 2010\projects\realots\realotsbot\realotsbot\Form1. h 12
    Error 4 error C2059: syntax error : '.' c:\users\acerkasper\documents\visual studio 2010\projects\realots\realotsbot\realotsbot\Form1. h 12
    Error 5 error C2059: syntax error : 'public' c:\users\acerkasper\documents\visual studio 2010\projects\realots\realotsbot\realotsbot\Form1. h 17
    Error 6 error C2143: syntax error : missing ';' before '{' c:\users\acerkasper\documents\visual studio 2010\projects\realots\realotsbot\realotsbot\Form1. h 18
    Error 7 error C2447: '{' : missing function header (old-style formal list?) c:\users\acerkasper\documents\visual studio 2010\projects\realots\realotsbot\realotsbot\Form1. h 18
    Error 8 error C2061: syntax error : identifier 'Form1' c:\Users\acerkasper\documents\visual studio 2010\Projects\Realots\RealotsBot\RealotsBot\Realot sBot.cpp 16

    Also my form is not
    Form1.Cs but Form1.H idk if this matters.
    And I didn't get step 3 of the readme file ::
    3) Then click the file in Solution Explorer, and change the property Copy to Output to "Copy if Newer".::
    So i skipped that :P maybe that can be my problem but can som1 help me then to fix it?

    A picture of my project.. Because my english sucks.


    I hope som1 wants too help me

    P.S i'm using Microsoft Visual C++ 2010 express




  2. #2
    sleepy22
    Guest

    RE: [HELP] TibiaAPI.Dll import error.

    Visual Basic (VB.NET) is best Microsoft Product for use on Tibiaapi

  3. #3
    Super Moderator
    Join Date
    May 2007
    Posts
    1,191

    RE: [HELP] TibiaAPI.Dll import error.

    Quote Originally Posted by sleepy22
    Visual Basic (VB.NET) is best Microsoft Product for use on Tibiaapi
    C#...?

  4. #4
    Moderator
    Join Date
    Oct 2009
    Posts
    482

    RE: [HELP] TibiaAPI.Dll import error.

    You forgot ; after using Tibia.Objects

    @sleepy22
    No, it isn't the best. There are 3 ways: C++, C#, VB.Net - they are the same, but just different language

  5. #5
    Junior Member
    Join Date
    Aug 2010
    Posts
    29

    RE: [HELP] TibiaAPI.Dll import error.

    thanks mut![hr]
    But eh now i have this error!
    1>------ Build started: Project: RealotsBot, Configuration: Debug Win32 ------
    1> RealotsBot.cpp
    1>c:\users\acerkasper\documents\visual studio 2010\projects\realots\realotsbot\realotsbot\Form1. h(11): error C2873: 'Tibia' : symbol cannot be used in a using-declaration
    1>c:\users\acerkasper\documents\visual studio 2010\projects\realots\realotsbot\realotsbot\Form1. h(12): error C2143: syntax error : missing ';' before '.'
    1>c:\users\acerkasper\documents\visual studio 2010\projects\realots\realotsbot\realotsbot\Form1. h(12): error C2873: 'Tibia' : symbol cannot be used in a using-declaration
    1>c:\users\acerkasper\documents\visual studio 2010\projects\realots\realotsbot\realotsbot\Form1. h(12): error C2059: syntax error : '.'
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

  6. #6
    Moderator
    Join Date
    Oct 2009
    Posts
    482

    RE: [HELP] TibiaAPI.Dll import error.

    Try moving all using out of namespace
    like
    Code:
    using Something1;
    using Something2;
    
    namespace LolBot
    {
    However I'm not too good at C++ so I can be wrong

  7. #7
    Junior Member
    Join Date
    Aug 2010
    Posts
    29

    RE: [HELP] TibiaAPI.Dll import error.

    Hmm i've tried

    now my code looks like this:


    [code=csharp]#pragma once

    namespace RealotsBot {

    using namespace System;
    using namespace System::ComponentModel;
    using namespace System::Collections;
    using namespace System::Windows::Forms;
    using namespace System:ata;
    using namespace System:rawing;
    using namespace Tibia;
    using namespace Tibia.Objects;

    /// <summary>
    /// Summary for Form1
    /// </summary>
    public ref class Form1 : public System::Windows::Forms::Form
    {
    public:
    Form1(void)
    {
    InitializeComponent();
    //
    //TODO: Add the constructor code here
    //
    }

    protected:
    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    ~Form1()
    {
    if (components)
    {
    delete components;
    }
    }

    private:
    /// <summary>
    /// Required designer variable.
    /// </summary>
    System::ComponentModel::Container ^components;

    #pragma region Windows Form Designer generated code
    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    void InitializeComponent(void)
    {
    this->SuspendLayout();
    //
    // Form1
    //
    this->AutoScaleDimensions = System:rawing::SizeF(6, 13);
    this->AutoScaleMode = System::Windows::Forms::AutoScaleMode::Font;
    this->ClientSize = System:rawing::Size(284, 262);
    this->Name = L"Form1";
    this->Text = L"Form1";
    this->Load += gcnew System::EventHandler(this, &Form1::Form1_Load);
    this->ResumeLayout(false);

    }
    #pragma endregion
    private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) {
    }
    };
    }[/code]

    But still these errors:
    1> RealotsBot.cpp
    1>c:\users\acerkasper\documents\visual studio 2010\projects\realots\realotsbot\realotsbot\Form1. h(12): error C2143: syntax error : missing ';' before '.'
    1>c:\users\acerkasper\documents\visual studio 2010\projects\realots\realotsbot\realotsbot\Form1. h(12): error C2059: syntax error : '.'
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    Can this be because i skipped step 3?

    Step3:
    3) Then click the file in Solution Explorer, and change the property Copy to Output to "Copy if Newer".

    I didn't know how to do this xD maybe some1 can explain it to me

    [hr]
    Btw if i'm doing this
    namespace RealotsBot {

    using System;
    using System::ComponentModel;
    using System::Collections;
    using System::Windows::Forms;
    using System:ata;
    using System:rawing;
    using Tibia;
    using Tibia.Objects;

    I get like 100 errors xD

  8. #8
    Moderator
    Join Date
    Oct 2009
    Posts
    482

    RE: [HELP] TibiaAPI.Dll import error.

    using namespace Tibia::Objects;

  9. #9
    Junior Member
    Join Date
    Aug 2010
    Posts
    29

    RE: [HELP] TibiaAPI.Dll import error.

    MUTLLEY YOU ARE MY HERO!!! IT WORKS!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •