Jump to content
  • 0

Eroare la compile (cmd:createhouse)


Samp player

Question

Salutari!

Am o scurta intrebare legata de GM-ul "notype".

peiN a spus ca n-a adaugat comanda de createhouse in GM, dar totusi, cu un mic search am gasit comanda pusa pe /*.

Am "activat-o", am compilat si am primit eroare la linia 24185, ca simbolul "housess" nu era definit, am mers in folderul cu "define-uri", am pus "#define housess", am salvat, am intrat in Gm si am compilat iar, dupa care a urmat:

Spoiler

C:\Users\PC\Desktop\gamemode gamma notype yt\gamemodes\rpgx.pwn(24815) : error 029: invalid expression, assumed zero
C:\Users\PC\Desktop\gamemode gamma notype yt\gamemodes\rpgx.pwn(24815) : warning 215: expression has no effect
C:\Users\PC\Desktop\gamemode gamma notype yt\gamemodes\rpgx.pwn(24815) : error 001: expected token: ";", but found ")"
C:\Users\PC\Desktop\gamemode gamma notype yt\gamemodes\rpgx.pwn(24815) : error 029: invalid expression, assumed zero
C:\Users\PC\Desktop\gamemode gamma notype yt\gamemodes\rpgx.pwn(24815) : fatal error 107: too many error messages on one line

Apropo, asta este linia:

SetPVarInt(playerid, "pHiVW", housess+1);

Nu stiu cat conteaza, dar am zis s-o pun aici.

Edited by Samp player
Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

C:\Users\PC\Desktop\gamemode gamma notype yt\gamemodes\rpgx.pwn(24815) : error 001: expected token: ";", but found ")"

 

Inchide linia cu " ; " la fel ca si celelalte.

 

Daca nu postezi si scriptul, degeaba incerc sa te ajut.

Link to comment
Share on other sites

  • 0
Acum 6 ore, Goad a spus:

C:\Users\PC\Desktop\gamemode gamma notype yt\gamemodes\rpgx.pwn(24815) : error 001: expected token: ";", but found ")"

 

Inchide linia cu " ; " la fel ca si celelalte.

 

Daca nu postezi si scriptul, degeaba incerc sa te ajut.

Spoiler

CMD:createhouse(playerid, params[])
{
    if(gPlayerLogged[playerid] == 0) return SendClientMessage(playerid, COLOR_RED, "You need to login first.");
    if(IsPlayerConnected(playerid))
    {
        if(EstiFondator(playerid))
        {
                new ivLevel,ivPrice,ivInt,Float:IntPos[3], inter,Float:pX,Float:pY,Float:pZ,string[128],PropertyString[256],query[500];
                if(sscanf(params, "iii",ivLevel,ivPrice,ivInt)) return SendClientMessage(playerid, 0xFFFFFFFF, "{00FFFF}Syntax: {ffffff}/createhouse <Level> <Price> <Interior>");
                GetPlayerPos(playerid, pX, pY, pZ);
                SetPVarFloat(playerid, "pHeX", pX);
                SetPVarFloat(playerid, "pHeY", pY);
                SetPVarFloat(playerid, "pHeZ", pZ);
                SetPVarInt(playerid, "hExt", 1);
                SendClientMessage(playerid, COLOR_YELLOW, "{ffffff}[Step {ff0000}1{ffffff}/{ff0000}4{ffffff}] Exteriorul casei a fost pozitionat.");

                if(ivLevel < 1 || ivLevel > 50) return 1;
                if(ivPrice < 1 || ivPrice > 100000000) return 1;
                if(ivInt < 1 || ivInt > 42) return 1;
                if(ivInt == 1)IntPos[0] = 140.17, IntPos[1] = 1366.07, IntPos[2] = 1083.65, inter = 5;
                else if(ivInt == 2)IntPos[0] = 2324.53, IntPos[1] = -1149.54, IntPos[2] = 1050.71, inter = 12;
                else if(ivInt == 3)IntPos[0] = 225.68, IntPos[1] = 1021.45, IntPos[2] = 1084.02, inter = 7;
                else if(ivInt == 4) IntPos[0] = 234.19, IntPos[1] = 1063.73, IntPos[2] = 1084.21, inter = 6;
                else if(ivInt == 5) IntPos[0] = 226.30, IntPos[1] = 1114.24, IntPos[2] = 1080.99, inter = 5;
                else if(ivInt == 6) IntPos[0] = 235.34, IntPos[1] = 1186.68, IntPos[2] = 1080.26, inter = 3;
                else if(ivInt == 7) IntPos[0] = 491.07, IntPos[1] = 1398.50, IntPos[2] = 1080.26, inter = 2;
                else if(ivInt == 8) IntPos[0] = 24.04, IntPos[1] = 1340.17, IntPos[2] = 1084.38, inter = 10;
                else if(ivInt == 9) IntPos[0] = -283.44, IntPos[1] = 1470.93, IntPos[2] = 1084.38, inter = 15;
                else if(ivInt == 10) IntPos[0] = -260.49, IntPos[1] = 1456.75, IntPos[2] = 1084.37, inter = 4;
                else if(ivInt == 11) IntPos[0] = 83.03, IntPos[1] = 1322.28, IntPos[2] = 1083.87, inter = 9;
                else if(ivInt == 12) IntPos[0] = 2317.89, IntPos[1] = -1026.76, IntPos[2] = 1050.22, inter = 9;
                else if(ivInt == 13) IntPos[0] = 2495.98, IntPos[1] = -1692.08, IntPos[2] = 1014.74, inter = 3;
                else if(ivInt == 14) IntPos[0] = 2807.48, IntPos[1] = -1174.76, IntPos[2] = 1025.57, inter = 8;
                else if(ivInt == 15) IntPos[0] = 2196.85, IntPos[1] = -1204.25, IntPos[2] = 1049.02, inter = 6;
                else if(ivInt == 16) IntPos[0] = 377.15, IntPos[1] = 1417.41, IntPos[2] = 1081.33, inter = 15;
                else if(ivInt == 17) IntPos[0] = 2270.38, IntPos[1] = -1210.35, IntPos[2] = 1047.56, inter = 10;
                else if(ivInt == 18) IntPos[0] = 446.99, IntPos[1] = 1397.07, IntPos[2] = 1084.30, inter = 2;
                else if(ivInt == 19) IntPos[0] = 387.22, IntPos[1] = 1471.70, IntPos[2] = 1080.19, inter = 15;
                else if(ivInt == 20) IntPos[0] = 22.88, IntPos[1] = 1403.33, IntPos[2] = 1084.44, inter = 5;
                else if(ivInt == 21) IntPos[0] = 2365.31, IntPos[1] = -1135.60, IntPos[2] = 1050.88, inter = 8;
                else if(ivInt == 22) IntPos[0] =  2237.59, IntPos[1] = -1081.64, IntPos[2] = 1049.02, inter = 2;
                else if(ivInt == 23) IntPos[0] = 295.04, IntPos[1] = 1472.26, IntPos[2] = 1080.26, inter = 15;
                else if(ivInt == 24) IntPos[0] =  261.12, IntPos[1] = 1284.30, IntPos[2] = 1080.26, inter = 4;
                else if(ivInt == 25) IntPos[0] = 221.92, IntPos[1] = 1140.20, IntPos[2] = 1082.61, inter = 4;
                else if(ivInt == 26) IntPos[0] = -68.81, IntPos[1] = 1351.21, IntPos[2] = 1080.21, inter = 6;
                else if(ivInt == 27) IntPos[0] = 260.85, IntPos[1] = 1237.24, IntPos[2] = 1084.26, inter = 9;
                else if(ivInt == 28) IntPos[0] =  2468.84, IntPos[1] = -1698.24, IntPos[2] = 1013.51, inter = 2;
                else if(ivInt == 29) IntPos[0] = 223.20, IntPos[1] = 1287.08, IntPos[2] = 1082.14, inter = 1;
                else if(ivInt == 30) IntPos[0] =  2283.04, IntPos[1] = -1140.28, IntPos[2] = 1050.90, inter = 11;
                else if(ivInt == 31) IntPos[0] = 328.05, IntPos[1] = 1477.73, IntPos[2] = 1084.44, inter = 15;
                else if(ivInt == 32) IntPos[0] = 223.20, IntPos[1] = 1287.08, IntPos[2] = 1287.08, inter = 1;
                else if(ivInt == 33) IntPos[0] = -42.59, IntPos[1] = 1405.47, IntPos[2] = 1084.43, inter = 8;
                else if(ivInt == 34) IntPos[0] = 446.90, IntPos[1] = 506.35, IntPos[2] = 1001.42, inter = 12;
                else if(ivInt == 35) IntPos[0] = 299.78, IntPos[1] = 309.89, IntPos[2] = 1003.30, inter = 4;
                else if(ivInt == 36) IntPos[0] = 2308.77, IntPos[1] = -1212.94, IntPos[2] = 1049.02, inter = 6;
                else if(ivInt == 37) IntPos[0] = 2233.64, IntPos[1] = -1115.26, IntPos[2] = 1050.88, inter = 5;
                else if(ivInt == 38) IntPos[0] = 2218.40, IntPos[1] = -1076.18, IntPos[2] = 1050.48, inter = 1;
                else if(ivInt == 39) IntPos[0] = 266.50, IntPos[1] = 304.90, IntPos[2] = 999.15, inter = 2;
                else if(ivInt == 40) IntPos[0] = 243.72, IntPos[1] = 304.91, IntPos[2] = 999.15, inter = 1;
                else if(ivInt == 41) IntPos[0] = 343.81, IntPos[1] = 304.86, IntPos[2] = 999.15, inter = 6;
                else if(ivInt == 42) IntPos[0] = 2259.38, IntPos[1] = -1135.77, IntPos[2] = 1050.64, inter = 10;
                GetPlayerPos(playerid, pX, pY, pZ);
                SetPVarFloat(playerid, "pHiX", IntPos[0]);
                SetPVarFloat(playerid, "pHiY", IntPos[1]);
                SetPVarFloat(playerid, "pHiZ", IntPos[2]);
                SetPVarInt(playerid, "pHiID", GetPlayerInterior(playerid));
                SetPVarInt(playerid, "pHiVW", housess+1);
                SetPVarInt(playerid, "hInt", inter);
                SendClientMessage(playerid, COLOR_YELLOW, "{ffffff}[Step {ff0000}2{ffffff}/{ff0000}4{ffffff}] Interiorul casei a fost pozitionat.");

                new i = housess+1;
                mysql_format(SQL, query, sizeof(query), "INSERT INTO houses (Owner, Lockk, Hel, Arm, Level, Rentabil, Rent, Owned, Discription, Value, Takings) VALUES('The State', '0', '0', '0', '10', '1', '500', '0', 'House', '10000000', '0')");
                mysql_tquery(SQL, query, "", "");

                HouseInfo[hID]                           = i;
                   HouseInfo[hEntrancex]                    = GetPVarFloat(playerid, "pHeX");
                HouseInfo[hEntrancey]                    = GetPVarFloat(playerid, "pHeY");
                 HouseInfo[hEntrancez]                    = GetPVarFloat(playerid, "pHeZ");
                HouseInfo[hExitx]                        = GetPVarFloat(playerid, "pHiX");
                HouseInfo[hExity]                        = GetPVarFloat(playerid, "pHiY");
                HouseInfo[hExitz]                        = GetPVarFloat(playerid, "pHiZ");
                format(HouseInfo[hOwner], 64, "The State");
                format(HouseInfo[hDiscription], 64, "House");
                HouseInfo[hValue]                        = ivPrice;
                SendClientMessage(playerid, COLOR_YELLOW, "{ffffff}[Step {ff0000}3{ffffff}/{ff0000}4{ffffff}] Pretul casei a fost setat.");
                HouseInfo[hHel]                          = 0;
                  HouseInfo[hArm]                          = 0;
                HouseInfo[hInterior]                     = GetPVarInt(playerid, "hInt");
                HouseInfo[hLock]                         = 0;
                HouseInfo[hOwned]                        = 0;
                HouseInfo[hRent]                         = 500;
                HouseInfo[hRentabil]                     = 1;
                HouseInfo[hTakings]                      = 0;
                HouseInfo[hLevel]                        = ivLevel;
                SendClientMessage(playerid, COLOR_YELLOW, "{ffffff}[Step {ff0000}4{ffffff}/{ff0000}4{ffffff}] Levelul casei a fost setat.");
                HouseInfo[hVirtual]                      = GetPVarInt(playerid, "pHiVW");

                mysql_format(SQL, query, sizeof(query), "UPDATE `houses` SET `Entrancex`='%f',`Entrancey`='%f',`Entrancez`='%f',`Exitx`='%f',`Exity`='%f',`Exitz`='%f',`Interior`='%d',`Virtual`='%d',`Value`='%d',`Level`='%d' WHERE `ID`='%d'",HouseInfo[hEntrancex],HouseInfo[hEntrancey],HouseInfo[hEntrancez],HouseInfo[hExitx],HouseInfo[hExity],HouseInfo[hExitz],HouseInfo[hInterior],HouseInfo[hVirtual],HouseInfo[hValue],HouseInfo[hLevel],i);
                mysql_tquery(SQL,query,"","");

                DeletePVar(playerid, "pHeX");
                DeletePVar(playerid, "pHeY");
                DeletePVar(playerid, "pHeZ");
                DeletePVar(playerid, "pHiX");
                DeletePVar(playerid, "pHeY");
                DeletePVar(playerid, "pHeZ");
                DeletePVar(playerid, "pHiID");
                DeletePVar(playerid, "pHiVW");
                DeletePVar(playerid, "pExt");
                DeletePVar(playerid, "pInt");

                DestroyDynamic3DTextLabel(HouseLabel);
                format(PropertyString, sizeof(PropertyString),"{FFFFFF}House {FF0000}%d \n{FF0000}This house is for sale(/buyhouse) ! \n{FFFFFF}Description: {FF0000}%s \n{FFFFFF}Price: {FF0000}$%s \n{FFFFFF}Level: {FF0000}%d",i,HouseInfo[hDiscription],FormatNumber(HouseInfo[hValue]),HouseInfo[hLevel]);
                HouseLabel = CreateDynamic3DTextLabel(PropertyString ,0x09FF00CC,HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez],25, INVALID_PLAYER_ID, INVALID_VEHICLE_ID, 1, -1, -1, -1, 100.0);
                DestroyDynamicPickup(HousePickup);
                HousePickup = CreateDynamicPickup(1273, 23, HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez]);

                SetPlayerInterior(playerid, 0);
                SetPlayerVirtualWorld(playerid, 0);
                SetPlayerPos(playerid, HouseInfo[hEntrancex], HouseInfo[hEntrancey], HouseInfo[hEntrancez]);
                housess++;
                format(string,sizeof(string),"House %d created succesfully!",i);
                SendClientMessage(playerid, COLOR_YELLOW, string);
        }
        else return SendClientMessage(playerid, COLOR_ERROR, AdminOnly);
    }
    return 1;
}

Ai acolo toata comanda... :/

E inchisa in ";"..

 

Totusi cum le pot rezolva pe toate? Adica aia ar trebui sa rezolve tot? :/

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more details you can also review our Terms of Use and Privacy Policy.