21.02.2013, 22:52
My files that are made are saving as, "%i" in my 'Houses' folder. I'm not sure if this is the solution, but when I try to turn..
I get..
Original:
pawn Код:
new INI:file = INI_Open(HousePath),str[128];
to
new INI:file = INI_Open(HousePath(id)),str[128];
pawn Код:
C:\Users\Redcorn\Desktop\Your Life\gamemodes\sanfierro.pwn(113) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Redcorn\Desktop\Your Life\gamemodes\sanfierro.pwn(113) : warning 215: expression has no effect
C:\Users\Redcorn\Desktop\Your Life\gamemodes\sanfierro.pwn(113) : error 001: expected token: ";", but found ")"
C:\Users\Redcorn\Desktop\Your Life\gamemodes\sanfierro.pwn(113) : error 029: invalid expression, assumed zero
C:\Users\Redcorn\Desktop\Your Life\gamemodes\sanfierro.pwn(113) : fatal error 107: too many error messages on one line
Compilation aborted.Pawn compiler 3.2.3664 Copyright (c) 1997-2006, ITB CompuPhase
4 Errors.
pawn Код:
#define HousePath "Houses/%i.ini"
CMD:create(playerid,params[])
{
if(pInfo[playerid][Admin]==3)
{
new model,Float:x,Float:y,Float:z,interior,id;
if(sscanf(params,"i",model,interior)) return SendClientMessage(playerid,COLOR_GRAY,"USAGE: /create [model] [interior]");
id = hcount;
hInfo[id][Xpos] = x;
hInfo[id][Ypos] = y;
hInfo[id][Zpos] = z;
hInfo[id][World] = GetPlayerVirtualWorld(playerid);
hInfo[id][Interior] = GetPlayerInterior(playerid);
GetPlayerPos(playerid,x,y,z);
new INI:file = INI_Open(HousePath),str[128]; // here
format(str,sizeof(str),"%f,%f,%f",x,y,z);
INI_WriteString(file,"%f,%f,%f",str);
INI_Close(file);
CreateDynamicPickup(model,1,x,y,z,GetPlayerVirtualWorld(playerid));
}
return 1;
}