31.12.2014, 13:04
Just to be clear:
The IDs of business in businesses folder: http://prntscr.com/5mz6vo (as well YINI with player accounts but with different names of players)
Only one file in scriptfiles without any folder: http://prntscr.com/5mz8mi That what i need.
The writing values function:
What it really writes on INIBiz.cfg: http://prntscr.com/5mz8wu (There is only one business with value, it should write all the MAX_BIZ (100))
The Loading function: (I dont know - public LoadDynamic_Businesses(bizid,name[],value[]) what to change here to get no errors)
The IDs of business in businesses folder: http://prntscr.com/5mz6vo (as well YINI with player accounts but with different names of players)
Only one file in scriptfiles without any folder: http://prntscr.com/5mz8mi That what i need.
The writing values function:
Quote:
stock SaveBizEx() { for(new idx = 1; idx < MAX_BIZ; idx++) { new var[32], INI:File = INI_Open("INIbiz.cfg"); // INI_SetTag(File, "Businesses"); // Is that necessary for one file? format(var, 32, "b%dOwner", idx); INI_WriteString(File, var, BizInfo[idx][bOwner]); format(var, 32, "b%dType", idx); INI_WriteInt(File, var, BizInfo[idx][bType]); format(var, 32, "b%dLocked", idx); INI_WriteInt(File, var, BizInfo[idx][bLocked]); format(var, 32, "b%dMoney", idx); INI_WriteInt(File, var, BizInfo[idx][bMoney]); format(var, 32, "b%dProducts", idx); INI_WriteInt(File, var, BizInfo[idx][bProducts]); format(var, 32, "b%dSold", idx); INI_WriteInt(File, var, BizInfo[idx][bSold]); format(var, 32, "b%dLevel", idx); INI_WriteInt(File, var, BizInfo[idx][bLevel]); format(var, 32, "b%dPrice", idx); INI_WriteInt(File, var, BizInfo[idx][bPrice]); format(var, 32, "b%dAP", idx); INI_WriteInt(File, var, BizInfo[idx][bAP]); format(var, 32, "b%dFee", idx); INI_WriteInt(File, var, BizInfo[idx][bFee]); format(var, 32, "b%dInt", idx); INI_WriteInt(File, var, BizInfo[idx][bInt]); format(var, 32, "b%dExtX", idx); INI_WriteFloat(File, var, BizInfo[idx][bExtX]); format(var, 32, "b%dExtY", idx); INI_WriteFloat(File, var, BizInfo[idx][bExtY]); format(var, 32, "b%dExtZ", idx); INI_WriteFloat(File, var, BizInfo[idx][bExtZ]); format(var, 32, "b%dExtFA", idx); INI_WriteFloat(File, var, BizInfo[idx][bExtFA]); format(var, 32, "b%dIntX", idx); INI_WriteFloat(File, var, BizInfo[idx][bIntX]); format(var, 32, "b%dIntY", idx); INI_WriteFloat(File, var, BizInfo[idx][bIntY]); format(var, 32, "b%dIntZ", idx); INI_WriteFloat(File, var, BizInfo[idx][bIntZ]); format(var, 32, "b%dIntFA", idx); INI_WriteFloat(File, var, BizInfo[idx][bIntFA]); INI_Close(File); return 1; } return 1; } |
The Loading function: (I dont know - public LoadDynamic_Businesses(bizid,name[],value[]) what to change here to get no errors)
Quote:
forward LoadDynamic_Businesses(bizid,name[],value[]); public LoadDynamic_Businesses(bizid,name[],value[]) { new var[32]; format(var, 32, "b%dOwner", bizid); INI_String(var, BizInfo[bizid][bOwner], 32); format(var, 32, "b%dType", bizid); INI_Int(var, BizInfo[bizid][bType]); format(var, 32, "b%dLocked", bizid); INI_Int(var, BizInfo[bizid][bLocked]); format(var, 32, "b%dMoney", bizid); INI_Int(var, BizInfo[bizid][bMoney]); format(var, 32, "b%dProducts", bizid); INI_Int(var, BizInfo[bizid][bProducts]); format(var, 32, "b%dSold", bizid); INI_Int(var, BizInfo[bizid][bSold]); format(var, 32, "b%dLevel", bizid); INI_Int(var, BizInfo[bizid][bLevel]); format(var, 32, "b%dPrice", bizid); INI_Int(var, BizInfo[bizid][bPrice]); format(var, 32, "b%dAP", bizid); INI_Int(var, BizInfo[bizid][bAP]); format(var, 32, "b%dFee", bizid); INI_Int(var, BizInfo[bizid][bFee]); format(var, 32, "b%dInt", bizid); INI_Int(var, BizInfo[bizid][bInt]); format(var, 32, "b%dExtX", bizid); INI_Float(var, BizInfo[bizid][bExtX]); format(var, 32, "b%dExtY", bizid); INI_Float(var, BizInfo[bizid][bExtY]); format(var, 32, "b%dExtZ", bizid); INI_Float(var, BizInfo[bizid][bExtZ]); format(var, 32, "b%dExtFA", bizid); INI_Float(var, BizInfo[bizid][bExtFA]); format(var, 32, "b%dIntX", bizid); INI_Float(var, BizInfo[bizid][bIntX]); format(var, 32, "b%dIntY", bizid); INI_Float(var, BizInfo[bizid][bIntY]); format(var, 32, "b%dIntZ", bizid); INI_Float(var, BizInfo[bizid][bIntZ]); format(var, 32, "b%dIntFA", bizid); INI_Float(var, BizInfo[bizid][bIntFA]); return 1; } |