18.02.2012, 16:16
PHP код:
(746)stock BuyHouse(playerid, houseid)
(747) {
(748) if (GetPlayerScore(playerid) >= 1000)
(749) new string2[256];
(750) new name[24];
(751) GetPlayerName(playerid, name, sizeof(name));
(752) #if defined PRINT_HOUSES
(753) printf("%s Bought House ID %d", name, houseid);
(754) #endif
(755) GivePlayerMoney(playerid, -hInfo[houseid][Cost]);
(756) format(string2,sizeof(string2), HOUSE_FILE, houseid);
(757) INI_Open(string2);
(758) INI_WriteString("Name", name);
(759) INI_WriteInt("Locked", 0);
(760) INI_Save();
(761) INI_Close();
(762) hInfo[houseid][Name] = name;
(763) hInfo[houseid][Locked] = 0;
(764) DestroyPickup(HousePickup[houseid]);
(765) HousePickup[houseid] = CreatePickup(1272, 23, hInfo[houseid][ExteriorX], hInfo[houseid][ExteriorY], hInfo[houseid][ExteriorZ]);
(766) ShowBoughtHouseMessage(playerid);
(767) return 1;
(768)}
C:\Users\User\Desktop\1.pwn(749) : error 003: declaration of a local variable must appear in a compound block
C:\Users\User\Desktop\1.pwn(749) : warning 217: loose indentation
C:\Users\User\Desktop\1.pwn(749) : error 017: undefined symbol "string2"
C:\Users\User\Desktop\1.pwn(749) : warning 215: expression has no effect
C:\Users\User\Desktop\1.pwn(749) : error 001: expected token: ";", but found "]"
C:\Users\User\Desktop\1.pwn(749) : fatal error 107: too many error messages on one line