My own house-making FS. (2 errors) [REP ++]
#1

Hey, I am making a FS and you can make houses with it while IG. I made the /createhouse command already, but I am having some problems now with loading them up. This is supposed to loop through all the houses, create the existing houses into the server.
pawn Код:
stock Laemajad(majaid)
{
    for(new i = 0; i < MAX_MAJAD; i++)
    {
        new fail[128];
        format(fail, sizeof(fail), "Majad/%d.txt", i);
        if(dini_Exists(fail)) break;
        MajaInfo[i][hOmanik] = dini_Get(fail, "Omanik");
        MajaInfo[i][hMuugis] = dini_Int(fail, "Muugis");
        MajaInfo[i][hHind]= dini_Int(fail, "Hind(kui mььgiks)");
        MajaInfo[i][hNimi] = dini_Int(fail, "Nimi");
        MajaInfo[i][X] = dini_Int(fail, "Sisenemise X");
        MajaInfo[i][Y] = dini_Int(fail, "Sisenemise Y");
        MajaInfo[i][Z] = dini_Int(fail, "Sisenemise Z");
        MajaInfo[i][hVirtualworld] = dini_Int(fail, "Vдlimine virtualworld");
        hSisenemine[i] = CreateDynamicCP(MajaInfo[i][X], MajaInfo[i][Y],MajaInfo[i][Z],1.5, MajaInfo[i][hVirtualworld]);
        hValjumine[i] = CreateDynamicCP(MajaInfo[i][intX], MajaInfo[i][intY],MajaInfo[i][intZ],1.5, MajaInfo[i][hsVirtualworld]);
        new 3dtext[100];
        switch(MajaInfo[i][hMuugis])
        {
            case 0:{format(3dtext, sizeof(3dtext), "Omanik: %s\n%s", MajaInfo[i][hOmanik], MajaInfo[i][hNimi]);}
            case 1:(format(3dtext, sizeof(3dtext), "MAJA MЬЬGIKS:\nHind: %d", MajaInfo[i][mHind]);}
        }
        Create3DTextLabel(3dtext, C_BLUE, MajaInfo[i][X], MajaInfo[i][Y],MajaInfo[i][Z],1.5, MajaInfo[i][hVirtualworld]);
    }
}
And I am getting 1 error now, cant figure out how to fix this.
pawn Код:
(64) : error 021: symbol already defined: "Create3DTextLabel"
The line 64 is:
Код:
stock Laemajad(majaid)
Reply
#2

What is the function Laemajad to supossed do?
Reply
#3

I have all the houses saved in my scriptfiles, "Majad/%d.txt". When the filterscript starts, the Laemajad loads all the files in the scriptfiles. Case 0 when the house isn't for sale, case 1 when the house is for sale. So yeah, it loads all the houses, creates CP's and 3d texts.
Reply
#4

sorry i can't help.. the language is differnet
Reply
#5

stock Laemajad(majaid) = stock Loadhouses(houseid)
hOmanik = hOwner
hMuugis = hForsale
hHind = hPrice
hNimi = hName
MajaInfo = HouseInfo

Translated a bit, hope it helps.
Reply
#6

Quote:
Originally Posted by $$inSane
Посмотреть сообщение
sorry i can't help.. the language is differnet
Dude stop spamming if you don't know what is solution for here.
We can still help even the language is different, its not in language its in function.

On Topic:

Do you have double Create3DTextLabel function? or do you remember something that you add a Create3DTextLabel stock function?
Reply
#7

In the filterscript, I have 2 Create3DTextLabels actually. First one is on the error line 64, which I gave you before. And the other one is in the /createhouse command. The other line actually looks like this:
pawn Код:
Create3DTextLabel(string, C_BLUE, x, y, z, 20.0, 0, 0);
The 2'nd 3DTextLabel is on line 123.
Reply
#8

FIXED THE PROBLEM!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)