Wierd [roblem in public
#1

pawn Код:
public OnHouseDataLoad()
{
    for(new i = 0, i < MAX_HOUSES, i++)
    {
        hData[i][ID]        =   cache_get_row_int(0, ROW_ID, sqHandle);
        hData[i][Safe]      =   cache_get_row_int(0, ROW_SAFE, sqHandle);
        hData[i][Locked]    =   cache_get_row_int(0, ROW_LOCKED, sqHandle);
        hData[i][Owned]     =   cache_get_row_int(0, ROW_OWNED, sqHandle);
        hData[i][Price]     =   cache_get_row_int(0, ROW_PRICE, sqHandle);
        hData[i][Pickup]    =   cache_get_row_int(0, ROW_PICKUP, sqHandle);
        hData[i][Icon]      =   cache_get_row_int(0, ROW_ICON, sqHandle);
        hData[i][eX]        =   cache_get_row_int(0, ROW_EX, sqHandle);
        hData[i][eY]        =   cache_get_row_int(0, ROW_EY, sqHandle);
        hData[i][eZ]        =   cache_get_row_int(0, ROW_EZ, sqHandle);
        hData[i][iX]        =   cache_get_row_int(0, ROW_IX, sqHandle);
        hData[i][iY]        =   cache_get_row_int(0, ROW_IY, sqHandle);
        hData[i][iZ]        =   cache_get_row_int(0, ROW_IZ, sqHandle);
        hData[i][eVW]       =   cache_get_row_int(0, ROW_EVW, sqHandle);
        hData[i][eInt]      =   cache_get_row_int(0, ROW_EINT, sqHandle);
        hData[i][iVW]       =   cache_get_row_int(0, ROW_IVW, sqHandle);
        hData[i][iInt]      =   cache_get_row_int(0, ROW_IINT, sqHandle);
       
    }
    return 1;
}
It happens almost everytime I try to loop;
Код:
C:\Documents and Settings\Taha\Desktop\Project Standalone Survival\filterscripts\housesys.pwn(127) : error 021: symbol already defined: "i"
C:\Documents and Settings\Taha\Desktop\Project Standalone Survival\filterscripts\housesys.pwn(132) : warning 213: tag mismatch
C:\Documents and Settings\Taha\Desktop\Project Standalone Survival\filterscripts\housesys.pwn(127) : warning 204: symbol is assigned a value that is never used: "i"
C:\Documents and Settings\Taha\Desktop\Project Standalone Survival\filterscripts\housesys.pwn(337) : warning 203: symbol is never used: "hCount"
Reply
#2

You declared "i" as a global variable. Change it or change the variable name inside the loops.
Reply
#3

Can you show me where you use mysql_tquery with OnHouseDataLoad?
(Not the single line, but the whole code)
Reply
#4

The parts in a for-statement are separated by a semicolon, not a comma. A comma defines additional information or actions within a section.
pawn Код:
for( initializers ; condition ; increment )
Additionally, you should use cache_get_row_float for x, y and z.
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)