Wo ist hier der fehler ? Den bei den Plugin Strickendkind. Wenn dort was falsch ist spawnt man nicht. Und ich spawne nicht. Wo ist den hier der fehler ? public LoadProperty()
{
new query2[256];
// new h;
for(new idx; idx<MAX_HOUSE; idx++)
{
format(query2, sizeof(query2), "SELECT * FROM `haussystem` WHERE `houseid` = %i", idx);
mysql_query(query2);
mysql_store_result();
if(mysql_num_rows())
{
HouseInfo[idx][hEntrancex] = mysql_GetFloatByInt("haussystem", "hentrancex", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hEntrancey] = mysql_GetFloatByInt("haussystem", "hentrancey", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hEntrancez] = mysql_GetFloatByInt("haussystem", "hentrancez", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hExitx] = mysql_GetFloatByInt("haussystem", "hexitx", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hExity] = mysql_GetFloatByInt("haussystem", "hexity", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hExitz] = mysql_GetFloatByInt("haussystem", "hexitz", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hHealthx] = mysql_GetIntByInt("haussystem", "hhealthx", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hHealthy] = mysql_GetIntByInt("haussystem", "hhealthy", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hHealthz] = mysql_GetIntByInt("haussystem", "hhealthz", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hArmourx] = mysql_GetIntByInt("haussystem", "harmourx", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hArmoury] = mysql_GetIntByInt("haussystem", "harmoury", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hArmourz] = mysql_GetIntByInt("haussystem", "harmourz", "houseid",HouseInfo[idx][hID]);
strmid(HouseInfo[idx][hOwner], mysql_GetStringByInt("haussystem","howner","houseid",hID),0, 256,256);
strmid(HouseInfo[idx][hDiscription], mysql_GetStringByInt("haussystem","hdiscription","houseid",hID),0, 256,256);
HouseInfo[idx][hValue] = mysql_GetIntByInt("haussystem", "hvalue", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hHel] = mysql_GetIntByInt("haussystem", "hhel", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hArm] = mysql_GetIntByInt("haussystem", "harm", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hInt] = mysql_GetIntByInt("haussystem", "hint", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hLock] = mysql_GetIntByInt("haussystem", "hlock", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hOwned] = mysql_GetIntByInt("haussystem", "howned", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hRooms] = mysql_GetIntByInt("haussystem", "hrooms", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hRent] = mysql_GetIntByInt("haussystem", "hrent", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hRentabil] = mysql_GetIntByInt("haussystem", "hrentabil", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hDate] = mysql_GetIntByInt("haussystem", "hdate", "houseid",HouseInfo[idx][hID]);
HouseInfo[idx][hLevel] = mysql_GetIntByInt("haussystem", "hlevel", "houseid",HouseInfo[idx][hID]);
}
mysql_free_result();
}
print("Häuser geladen!");
return 1;
}
und das hier: public OnPropUpdate()
{
new idx;
new File: file2;
new query2[1024];
// new h;
for(new h;h!=MAX_HOUSE;h++)
{
format(query2,sizeof(query2),"UPDATE `haussystem` SET `hentrancex` = '%f' ,`hentrancey` = '%f' ,`hentrancez` = '%f' ,`hexitx` = '%f', `hexity` = '%f', `hexitz` = '%f', `hhealthx` = '%i' WHERE `houseid`='%i'",
HouseInfo[h][hEntrancex],HouseInfo[h][hEntrancey],HouseInfo[h][hEntrancez],HouseInfo[h][hExitx],HouseInfo[h][hExity],HouseInfo[h][hExitz],HouseInfo[h][hHealthx], h);
mysql_query(query2);
format(query2,sizeof(query2),"UPDATE `haussystem` SET `hhealthy` = '%i',`hhealthz` = '%i', `harmourx` = '%i', `harmoury` = '%i', `harmourz` = '%i', `hOwner` = '%s',`hdiscription` = '%s', `hvalue` = '%i',`hhel` = '%i' WHERE `houseid`='%i'",
HouseInfo[h][hHealthy],HouseInfo[h][hHealthz],HouseInfo[h][hArmourx],HouseInfo[h][hArmoury],HouseInfo[h][hArmourz], HouseInfo[h][hOwner], HouseInfo[h][hDiscription],HouseInfo[h][hValue],HouseInfo[h][hHel], h);
mysql_query(query2);
format(query2,sizeof(query2),"UPDATE `haussystem` SET `harm` = '%i',`hint` = '%i',`hlock` = '%i',`howned` = '%i',`hrooms` = '%i',`hrent` = '%i',`hrentabil` = '%i',`htakings` = '%i',`hdate` = '%i',`hlevel` = '%i' WHERE `houseid`='%i'",
HouseInfo[h][hArm],HouseInfo[h][hInt],HouseInfo[h][hLock],HouseInfo[h][hOwned],HouseInfo[h][hRooms],HouseInfo[h][hRent],HouseInfo[h][hRentabil],HouseInfo[h][hTakings],HouseInfo[h][hDate],HouseInfo[h][hLevel], h);
mysql_query(query2);
}
idx = 0; // Ab hier uninterresant!
while (idx < sizeof(BizzInfo)) // Ab hier uninterresant!
{ // Ab hier uninterresant! // Ab hier uninterresant!
new coordsstring[256]; // Ab hier uninterresant!
format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%f|%f|%f|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
BizzInfo[idx][bOwned],
BizzInfo[idx][bOwner],
BizzInfo[idx][bMessage],
BizzInfo[idx][bExtortion],
BizzInfo[idx][bEntranceX],
BizzInfo[idx][bEntranceY],
BizzInfo[idx][bEntranceZ],
BizzInfo[idx][bExitX],
BizzInfo[idx][bExitY],
BizzInfo[idx][bExitZ],
BizzInfo[idx][bLevelNeeded],
BizzInfo[idx][bBuyPrice],
BizzInfo[idx][bEntranceCost],
BizzInfo[idx][bTill],
BizzInfo[idx][bLocked],
BizzInfo[idx][bInterior],
BizzInfo[idx][bProducts],
BizzInfo[idx][bMaxProducts],
BizzInfo[idx][bPriceProd]);
if(idx == 0)
{
file2 = fopen("bizz.cfg", io_write);
}
else
{
file2 = fopen("bizz.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
idx = 0;
while (idx < sizeof(SBizzInfo))
{
new coordsstring[256];
format(coordsstring, sizeof(coordsstring), "%d|%s|%s|%s|%f|%f|%f|%d|%d|%d|%d|%d|%d|%d|%d|%d\n",
SBizzInfo[idx][sbOwned],
SBizzInfo[idx][sbOwner],
SBizzInfo[idx][sbMessage],
SBizzInfo[idx][sbExtortion],
SBizzInfo[idx][sbEntranceX],
SBizzInfo[idx][sbEntranceY],
SBizzInfo[idx][sbEntranceZ],
SBizzInfo[idx][sbLevelNeeded],
SBizzInfo[idx][sbBuyPrice],
SBizzInfo[idx][sbEntranceCost],
SBizzInfo[idx][sbTill],
SBizzInfo[idx][sbLocked],
SBizzInfo[idx][sbInterior],
SBizzInfo[idx][sbProducts],
SBizzInfo[idx][sbMaxProducts],
SBizzInfo[idx][sbPriceProd]);
if(idx == 0)
{
file2 = fopen("sbizz.cfg", io_write);
}
else
{
file2 = fopen("sbizz.cfg", io_append);
}
fwrite(file2, coordsstring);
idx++;
fclose(file2);
}
return 1;
}