[Help] [HELP] Добавяне на /post 97j

stivnnik

New Member
Joined
Sep 7, 2008
Messages
4
Reaction score
0
Здравейте, намерих source код за /post, но като искам да го направа на .dll (с Microsoft Visual Studio 2008) ми изкарва следните грешчици:

Code:
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(12) : error C3861: 'gObjIsConnected': identifier not found
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(13) : error C3861: 'DataSend': identifier not found
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(18) : error C2065: 'IsPost' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(19) : error C3861: 'gObjIsConnected': identifier not found
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(22) : error C2065: 'szPrefix' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(22) : error C3861: 'MessageOutput': identifier not found
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(23) : error C2065: 'szPrefix' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(23) : error C2065: 'PostCost' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(23) : error C2065: 'PostLevel' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(23) : error C3861: 'MessageOutput': identifier not found
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(26) : error C3861: 'gObj_SetInfo': identifier not found
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(27) : error C2065: 'gObj' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(27) : error C2228: left of '.Level' must have class/struct/union
        type is ''unknown-type''
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(27) : error C2065: 'PostLevel' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(29) : error C2065: 'szPrefix' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(29) : error C3861: 'MessageOutput': identifier not found
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(32) : error C2065: 'gObj' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(32) : error C2228: left of '.Money' must have class/struct/union
        type is ''unknown-type''
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(32) : error C2065: 'PostCost' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(34) : error C2065: 'szPrefix' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(34) : error C3861: 'MessageOutput': identifier not found
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(39) : error C3861: 'malloc': identifier not found
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(43) : error C2065: 'gObj' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(43) : error C2228: left of '.Nick' must have class/struct/union
        type is ''unknown-type''
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(43) : error C2065: 'gObj' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(43) : error C2228: left of '.Nick' must have class/struct/union
        type is ''unknown-type''
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(44) : error C3861: 'sprintf': identifier not found
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(49) : error C2065: 'gObj' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(49) : error C2228: left of '.Money' must have class/struct/union
        type is ''unknown-type''
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(49) : error C2065: 'PostCost' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(50) : error C2065: 'gObj_Money' : undeclared identifier
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(50) : error C3861: 'gObj_Write': identifier not found
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(51) : error C3861: 'MoneySend': identifier not found
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(52) : error C3861: 'free': identifier not found
c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(53) : fatal error C1075: end of file found before the left brace '{' at 'c:\documents and settings\stefan nikolov\my documents\visual studio 2008\projects\unr3al\unr3al\unr3al.cpp(17)' was matched
Build log was saved at "file://c:\Documents and Settings\Stefan Nikolov\My Documents\Visual Studio 2008\Projects\unr3al\unr3al\Debug\BuildLog.htm"

За пръв път правя .dll, така че ако някой може да помогне ще съм му много благодарен.

skype: stivnnik8


P.S.

source кода е следния:
Code:
void DataSendAll(unsigned char* Packet, int Length)
{
    for (int i=6400; i<7400; i++)
        if(gObjIsConnected(i))
            DataSend(i, Packet, Length);
}

void SendPost(int wId, LPCSTR Command, LPCSTR Text)
{
    if (!IsPost) return;
    if (!gObjIsConnected(wId)) return;
    if (!strcmpi(Command, "/Post"))
    {
        MessageOutput(wId, "[%s] Useage: /Post <Msg>.", szPrefix);
        MessageOutput(wId, "[%s] Price for post: %d, Minimun Level: %d", szPrefix, PostCost, PostLevel);
        return;
    }
    gObj_SetInfo(wId);
    if (gObj.Level < PostLevel)
    {
        MessageOutput(wId, "[%s] You're level is too low to post!", szPrefix);
        return;
    }
    if (gObj.Money < PostCost) 
    {
        MessageOutput(wId, "[%s] You don't have enough money to post!", szPrefix);
        return;
    }
    BYTE *Packet;
    char Message[100];
    Packet = (BYTE*) malloc(200);
    memset(Packet, 0x00, 200);
    *Packet = 0xC1;
    *(Packet+2) = 0x00;
    memcpy((Packet+3), gObj.Nick, strlen(gObj.Nick));
    sprintf(Message, "@@[Global] %s", Text);
    memcpy((Packet+13), Message, strlen(Message));
    int Len = (strlen(Message) + 0x13);
    *(Packet+1) = Len;
    DataSendAll(Packet, Len);
    int Amount = (gObj.Money - PostCost);
    gObj_Write(wId, gObj_Money, Amount);
    MoneySend(wId, Amount);
    free (Packet);
 
Last edited: