error 017: undefined symbol
#1

I get these errors:
pawn Код:
C:\Users\joeytucker\Desktop\script.pwn(2101) : error 017: undefined symbol "MySQL_FetchRowID"
C:\Users\joeytucker\Desktop\script.pwn(2116) : error 017: undefined symbol "UpdateHouseInfo"
C:\Users\joeytucker\Desktop\script.pwn(2117) : error 017: undefined symbol "SaveHouse"
C:\Users\joeytucker\Desktop\script.pwn(2126) : error 017: undefined symbol "UpdateBusiness"
C:\Users\joeytucker\Desktop\script.pwn(2127) : error 017: undefined symbol "SaveBusiness"
C:\Users\joeytucker\Desktop\script.pwn(2135) : error 017: undefined symbol "SaveFaction"
C:\Users\joeytucker\Desktop\script.pwn(2143) : error 017: undefined symbol "SaveFaction"
C:\Users\joeytucker\Desktop\script.pwn(2150) : error 017: undefined symbol "DeleteCompany"
C:\Users\joeytucker\Desktop\script.pwn(2340) : error 017: undefined symbol "GetWeaponSlot"
C:\Users\joeytucker\Desktop\script.pwn(2344) : error 017: undefined symbol "PlayerName"
C:\Users\joeytucker\Desktop\script.pwn(2345) : error 017: undefined symbol "SendAdminMessage"
C:\Users\joeytucker\Desktop\script.pwn(2352) : error 017: undefined symbol "PlayerName"
C:\Users\joeytucker\Desktop\script.pwn(2354) : error 017: undefined symbol "BanPlayer"
C:\Users\joeytucker\Desktop\script.pwn(2518) : error 017: undefined symbol "SaveGangs"
C:\Users\joeytucker\Desktop\script.pwn(2519) : error 017: undefined symbol "SaveEntrances"
C:\Users\joeytucker\Desktop\script.pwn(2520) : error 017: undefined symbol "SaveHouses"
C:\Users\joeytucker\Desktop\script.pwn(2521) : error 017: undefined symbol "SaveBusinesses"
C:\Users\joeytucker\Desktop\script.pwn(2522) : error 017: undefined symbol "SaveJobs"
C:\Users\joeytucker\Desktop\script.pwn(2523) : error 017: undefined symbol "SaveFactions"
C:\Users\joeytucker\Desktop\script.pwn(2524) : error 017: undefined symbol "SaveBanks"
C:\Users\joeytucker\Desktop\script.pwn(2525) : error 017: undefined symbol "SaveTrees"
C:\Users\joeytucker\Desktop\script.pwn(2526) : error 017: undefined symbol "SaveArrests"
C:\Users\joeytucker\Desktop\script.pwn(2527) : error 017: undefined symbol "SaveGates"
C:\Users\joeytucker\Desktop\script.pwn(2528) : error 017: undefined symbol "SaveVehicles"
C:\Users\joeytucker\Desktop\script.pwn(2529) : error 017: undefined symbol "SaveObjects"
C:\Users\joeytucker\Desktop\script.pwn(2530) : error 017: undefined symbol "SaveGarages"
Here's the catch - they all exist.

pawn Код:
stock MySQL_FetchRowID(username[])
{
    new query[128], field[24], id = 0;
    format(query, sizeof(query), "SELECT `RowID` FROM `Accounts` WHERE `Username` = '%s'", username);
    mysql_query(query);
    mysql_store_result();
    if (mysql_num_rows() && mysql_retrieve_row())
    {
        mysql_fetch_field_row(field, "RowID");
        id = strval(field);
    }
    mysql_free_result();
    return id;
}
pawn Код:
stock UpdateHouseInfo(houseid)
{
    if (HouseEnum[houseid][houseExists])
    {
        new string[128];
        switch (HouseEnum[houseid][houseOwned])
        {
            case false: format(string, sizeof(string), "This house is for sale for {FFFFFF}$%d{F5DEB3}.\nType /buyhouse to purchase this house.", HouseEnum[houseid][housePrice]);
            case true: format(string, sizeof(string), "This house is owned\nby {FFFFFF}%s", HouseEnum[houseid][houseOwner]);
        }
        if (HouseEnum[houseid][houseSpawned])
        {
            DestroyDynamic3DTextLabel(HouseEnum[houseid][houseLabel]);
            DestroyDynamicPickup(HouseEnum[houseid][housePickup]);
        }
        HouseEnum[houseid][houseLabel] = CreateStreamed3DTextLabel(string, YELLOW2, HouseEnum[houseid][houseEnterX], HouseEnum[houseid][houseEnterY], HouseEnum[houseid][houseEnterZ], 15.0, HouseEnum[houseid][houseExitVW]);
        HouseEnum[houseid][housePickup] = CreateDynamicPickup(1273, 23, HouseEnum[houseid][houseEnterX], HouseEnum[houseid][houseEnterY], HouseEnum[houseid][houseEnterZ], HouseEnum[houseid][houseExitVW]);
        HouseEnum[houseid][houseSpawned] = true;
        return 1;
    }
    return 0;
}
Et cetera...

I have tried moving the stocks to the top and bottom of the scripts (where I don't get new errors) and I get the same each time. Any thoughts?
Reply
#2

Most likely a missing bracket, causes such errors to appear. Start commenting the last changes you've made, if the script works by then, the missing bracket is within the commented code.
Reply
#3

I thought it would be a missing bracket but I go through all code above it (which is only defines and news) and I can't find any. As for the last changes, they are all below the first error so I don't understand how that would even matter.
Reply
#4

Quote:
Originally Posted by [FMJ]PowerSurge
Посмотреть сообщение
I thought it would be a missing bracket but I go through all code above it (which is only defines and news) and I can't find any. As for the last changes, they are all below the first error so I don't understand how that would even matter.
I don't really know if the code necessarily haves to be below the missing bracket not to work; I'd double check just to be sure.
Reply
#5

I commented out my changes and it just stopped compiling. It's a good job I took a backup! Thanks anyway for the suggestions.
Reply
#6

Quote:
Originally Posted by [FMJ]PowerSurge
Посмотреть сообщение
I commented out my changes and it just stopped compiling. It's a good job I took a backup! Thanks anyway for the suggestions.
You can ctrl-z to undo stuff as long as you don't close the editor; If it stopped compiling then it's a code problem again most likely a missing bracket or misplaced/miscalled function.

Things such calling functions outside functions do mess up the compiler, unfinished strings also might screw it up too.
I once had compiler problems after using '\' inside a string without anything else after and not going to the next line too.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)