Invalid function or declaration
#1

pawn Код:
C:\Users\Dustin Reynolds\Desktop\test local server\gamemodes\U-RP.pwn(99588) : error 010: invalid function or declaration
pawn Код:
dcmd_asellhouse(playerid, params[])
{
    new Usage[128], id, string[ 128 ];
    if( sscanf( params, "dz", id, Usage) )
    {
        if( PlayerInfo[playerid][pAdmin] >= 1339 )
        {
            SendClientMessage( playerid, COLOR_WHITE, "USAGE: /asellhouse [houseid]" );
            return 1;
        }
    }
    else
    {
        if( PlayerInfo[playerid][pAdmin] >= 1339)
        {
            format( string, sizeof( string ), "Houses/House_%d.ini", id);
            if(strcmp(Usage, "exterior", true) == 0 )
            {
                if(!dini_Exists( string) )
                {
                    SendClientMessage( playerid, COLOR_GREY, "Invalid House ID!" );
                    return 1;
                }
                else
                {
                    format(HouseInfo[id][hOwner], 255, "Nobody" );
                    HouseInfo[id][hLocked] = 1;
                    HouseInfo[id][hOwned] = 0;
                    HouseInfo[id][hRadio] = 0;
                    HouseInfo[id][hGL] = 0;
                    HouseInfo[id][hLevel] = 1;
        //          HouseInfo[id][hIconID] = CreateDynamicMapIcon(HouseInfo[id][hExteriorX], HouseInfo[id][hExteriorY], HouseInfo[id][hExteriorZ], 31, 0, 0, -1, -1, 100.0);
                    HouseInfo[id][HPickupID] = CreateDynamicPickup(1273, 23, HouseInfo[id][hExteriorX], HouseInfo[id][hExteriorY], HouseInfo[id][hExteriorZ], 0, -1, -1, 150.0 );
//                  dini_Create(string);
                    dini_Set(string, "Owner", "Nobody");
                    dini_IntSet(string, "Owned", HouseInfo[id][hOwned]);
                    dini_IntSet(string, "Locked", HouseInfo[id][hLocked]);
                    dini_IntSet(string, "Level", HouseInfo[id][hLevel]);
                    dini_IntSet(string, "Price", 35000);
                    dini_IntSet(string, "Cash", 0);
                    dini_IntSet(string, "Crack", 0);
                    dini_IntSet(string, "Pot", 0);
                    dini_IntSet(string, "CarParts", 0);
                    dini_IntSet(string, "Rent", 50);
                    dini_IntSet(string, "Rentable", 1);
                    SpawnedHouses++;
                    format(string, sizeof(string), "{00F200}[House For Sale]{F0CC00}\nPrice: $%d\nLevel: %d\nID: %d\nTo buy type /buyhouse", HouseInfo[id][hPrice],HouseInfo[id][hLevel], id);
                    format( string, sizeof( string ), "Please now proceed to use /houselevel and /houseprice to setup House (ID: %d).", id);
                    SendClientMessage( playerid, COLOR_WHITE, string);
                    SendClientMessage( playerid, COLOR_LIGHTBLUE, "Successfully sold house!" );
                    SaveHouse(id);
                    }
                }
            }
        }
    }
    return 1;
}



I really can't figure this out. Can someone please help? Im sure im over looking something.
Reply
#2

Show the exact line from which you are having the error issue.
Reply
#3

pawn Код:
return 1;
Reply
#4

I'm seeing 100000 lines of code + dini real quality script there you didn't even mark the line with the error.
Reply
#5

The line that is having issues is the return 1; line
Reply
#6

SaveHouse(id);
}

Take out that bracket }
Reply
#7

Thank you, I can't believe I missed that. Thanks. +rep
Reply
#8

Be aware next time. xD
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)