Input line too long at mysql_format , rep ++ thanks!
#1

I get this errors:
pawn Код:
C:x(16203) : error 075: input line too long (after substitutions)
C:x(16204) : error 037: invalid string (possibly non-terminated string)
C:x(16204) : error 017: undefined symbol "UPDATE"
C:x(16204) : error 017: undefined symbol "businesses"
C:x(16204) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
5 Errors.
My code:
pawn Код:
stock saveBusiness(const id) {
    if(strlen(businessVariables[id][bOwner]) >= 1) {
        new
            queryString[1424];

        mysql_format(handle, queryString, sizeof(queryString), "UPDATE businesses SET businessExteriorX = '%f', businessExteriorY = '%f', businessExteriorZ = '%f', businessInteriorX = '%f', businessInteriorY = '%f', businessInteriorZ = '%f', businessInterior = '%d', businessType = '%d', businessName = '%e', businessOwner = '%e', businessPrice = '%d', businessVault = '%d', businessLock = '%d', businessMiscX = '%f', businessMiscY = '%f',businessMiscZ = '%f',businessEnterPrice = '%d', businessLevel = '%d' WHERE businessID = '%d'",
        businessVariables[id][bExteriorPos][0],
        businessVariables[id][bExteriorPos][1], businessVariables[id][bExteriorPos][2], businessVariables[id][bInteriorPos][0], businessVariables[id][bInteriorPos][1], businessVariables[id][bInteriorPos][2], businessVariables[id][bInterior], businessVariables[id][bType], businessVariables[id][bName], businessVariables[id][bOwner], businessVariables[id][bPrice], businessVariables[id][bVault], businessVariables[id][bLocked], businessVariables[id][bMiscPos][0],
        businessVariables[id][bMiscPos][1], businessVariables[id][bMiscPos][2],businessVariables[id][bEnterPrice],businessVariables[id][bLevel] id);
        mysql_tquery(handle, queryString);
    }
    else {
        return false;
    }

    return 1;
}
What to do for fixing ?
Reply
#2

pawn Код:
stock saveBusiness(const id) {
    if(strlen(businessVariables[id][bOwner]) >= 1) {
        new
            queryString[1424];

        mysql_format(handle, queryString, sizeof(queryString), "UPDATE businesses SET \
            businessExteriorX = '%f', \
            businessExteriorY = '%f', \
            businessExteriorZ = '%f', \
            businessInteriorX = '%f', \
            businessInteriorY = '%f', \
            businessInteriorZ = '%f', \
            businessInterior = '%d', \
            businessType = '%d', \
            businessName = '%e', \
            businessOwner = '%e', \
            businessPrice = '%d', \
            businessVault = '%d', \
            businessLock = '%d', \
            businessMiscX = '%f', \
            businessMiscY = '%f', \
            businessMiscZ = '%f', \
            businessEnterPrice = '%d', \
            businessLevel = '%d' \
            WHERE businessID = '%d'"
,
            businessVariables[id][bExteriorPos][0],
            businessVariables[id][bExteriorPos][1],
            businessVariables[id][bExteriorPos][2],
            businessVariables[id][bInteriorPos][0],
            businessVariables[id][bInteriorPos][1],
            businessVariables[id][bInteriorPos][2],
            businessVariables[id][bInterior],
            businessVariables[id][bType],
            businessVariables[id][bName],
            businessVariables[id][bOwner],
            businessVariables[id][bPrice],
            businessVariables[id][bVault],
            businessVariables[id][bLocked],
            businessVariables[id][bMiscPos][0],
            businessVariables[id][bMiscPos][1],
            businessVariables[id][bMiscPos][2],
            businessVariables[id][bEnterPrice],
            businessVariables[id][bLevel],
            id
        );
        mysql_tquery(handle, queryString);
    }
    else {
        return false;
    }

    return 1;
}
Reply
#3

i done it myself creating another mysql_format and antoher mysql_tquery.. but thanks
Reply


Forum Jump:


Users browsing this thread: