23.06.2012, 20:27
How to get the data from file?
I test it:
I test it:
Код:
#include <a_samp>
#include <sscanf2>
#include <streamer>
#define MAX_PROPERTYS 1000
#define FILE_PROPERTYS "Propertys/"
enum PropertyMain
{
PropertyName[50],
PropertyFile[100],
PropertyIncome,
PropertyPrice,
PropertyOwned,
PropertyOwner[MAX_PLAYER_NAME],
Float:PropertyX,
Float:PropertyY,
Float:PropertyZ
}
new Property[PropertyMain];
public OnFilterScriptInit()
{
for(new P = 0; P < MAX_PROPERTYS; P++)
{
format(Property[PropertyFile],100,"%s%d.ini",FILE_PROPERTYS,P);
if(fexist(Property[PropertyFile]))
{
new File:File = fopen(Property[PropertyFile],io_read);
new Name[50],Income,Price,Owned,Owner[MAX_PLAYER_NAME],Float:X,Float:Y,Float:Z;
sscanf(File,"siiisfff",Name,Income,Price,Owned,Owner,X,Y,Z);
}
}
return 1;
}
Quote:
|
C:\Documents and Settings\user\Pulpit\Serwer\filterscripts\Skrypt1. pwn(31) : error 035: argument type mismatch (argument 1) C:\Documents and Settings\user\Pulpit\Serwer\filterscripts\Skrypt1. pwn(29) : warning 204: symbol is assigned a value that is never used: "File" Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase 1 Error. |


@up Big thx