29.01.2015, 09:00
I have converted a dini housing system to YSI but i keep getting this error and i have no idea how to fix it.
All the errors are showing on one bit of code which is this part below.
Full code below.
Код:
(128) : error 017: undefined symbol "name" (128) : error 022: must be lvalue (non-constant) (128) : error 017: undefined symbol "value" (128) : fatal error 107: too many error messages on one line
Код:
INI_Int(string, "hOwned", 0);
Код:
command(hcreate, playerid, params[]) { new Usage[255], string[255]; if(IsPlayerAdmin(playerid)) { if(sscanf(params, "s[255]", Usage)) { SendClientMessage(playerid, COLOUR_WHITE, "USAGE: /hcreate [usage]"); SendClientMessage(playerid, COLOUR_GREY, "Usages: Exterior, Interior, Complete."); } else { new hID = ActiveHouses+1; if(strcmp(Usage, "exterior", true) == 0) { GetPlayerPos(playerid, House[hID][hExteriorX], House[hID][hExteriorY], House[hID][hExteriorZ]); GetPlayerFacingAngle(playerid, House[hID][hExteriorA]); House[hID][hExteriorVW] = GetPlayerVirtualWorld(playerid); House[hID][hExteriorInt] = GetPlayerInterior(playerid); format(string, sizeof(string), "You have successfully set the exterior of House %d.", hID); SendClientMessage(playerid, COLOUR_LIGHTBLUE, string); format(string, sizeof(string), "X: %f, Y: %f, Z: %f, A: %f, VW: %d, Int: %d", House[hID][hExteriorX], House[hID][hExteriorY], House[hID][hExteriorZ], House[hID][hExteriorA], House[hID][hExteriorVW], House[hID][hExteriorInt]); SendClientMessage(playerid, COLOUR_GREY, string); return 1; } if(strcmp(Usage, "interior", true) == 0) { GetPlayerPos(playerid, House[hID][hInteriorX], House[hID][hInteriorY], House[hID][hInteriorZ]); GetPlayerFacingAngle(playerid, House[hID][hInteriorA]); House[hID][hInteriorVW] = GetPlayerVirtualWorld(playerid); House[hID][hInteriorInt] = GetPlayerInterior(playerid); format(string, sizeof(string), "You have successfully set the interior of House %d.", hID); SendClientMessage(playerid, COLOUR_LIGHTBLUE, string); format(string, sizeof(string), "X: %f, Y: %f, Z: %f, A: %f, VW: %d, Int: %d", House[hID][hInteriorX], House[hID][hInteriorY], House[hID][hInteriorZ], House[hID][hInteriorA], House[hID][hInteriorVW], House[hID][hInteriorInt]); SendClientMessage(playerid, COLOUR_GREY, string); return 1; } if(strcmp(Usage, "complete", true) == 0) { if(House[hID][hExteriorX] > 0 && House[hID][hInteriorX] > 0) { if(hID >= MAX_HOUSES) { SendClientMessage(playerid, COLOUR_GREY, " Error: Too many houses are currently spawend."); } else { format(string, sizeof(string), "Houses/%d.ini", hID); if(!fexist(string)) { INI_Int(string, "hOwned", 0); INI_String(string, "hOwner", "Nobody"); INI_Int(string, "hPrice", 0); INI_Int(string, "hLock", 0); INI_Float(string, "hExteriorX", House[hID][hExteriorX]); INI_Float(string, "hExteriorY", House[hID][hExteriorY]); INI_Float(string, "hExteriorZ", House[hID][hExteriorZ]); INI_Float(string, "hExteriorA", House[hID][hExteriorA]); INI_Int(string, "hExteriorVW", House[hID][hExteriorVW]); INI_Int(string, "hExteriorInt", House[hID][hExteriorInt]); INI_Float(string, "hInteriorX", House[hID][hInteriorX]); INI_Float(string, "hInteriorY", House[hID][hInteriorY]); INI_Float(string, "hInteriorZ", House[hID][hInteriorZ]); INI_Float(string, "hInteriorA", House[hID][hInteriorA]); INI_Int(string, "hInteriorVW", House[hID][hInteriorVW]); INI_Int(string, "hInteriorInt", House[hID][hInteriorInt]); ActiveHouses++; format(string, sizeof(string), "You have successfully created House %d.", hID); SendClientMessage(playerid, COLOUR_LIGHTBLUE, string); SetPlayerPos(playerid, House[hID][hExteriorX], House[hID][hExteriorY], House[hID][hExteriorZ]); SetPlayerVirtualWorld(playerid, House[hID][hExteriorVW]); SetPlayerInterior(playerid, House[hID][hExteriorInt]); SetPlayerFacingAngle(playerid, House[hID][hExteriorA]); SetCameraBehindPlayer(playerid); RespawnHousePickup(hID); return 1; } else { SendClientMessage(playerid, COLOUR_GREY, " Error: File already exists, script error."); } } } else { SendClientMessage(playerid, COLOUR_GREY, " You need to set the house's (ex/in)terior before completing!"); return 1; } } } } else { SendClientMessage(playerid, COLOUR_GREY, " You are not an administrator!"); } return 1; }