File Problem (stock)
#1

Function:
pawn Код:
stock LoadAttachment(playerid)
{
    new str[50];
    GetPlayerName(playerid,str,50);
    format(str,50,"attachment/%s.ini",str);
    new File:f =fopen(str,io_read);
    new string[256+1];
    fread(string,256);
    new tmp[12][128];
    split(string, tmp, ',');
    new index, modelid, boneid,
       Float:fOffsetX, Float:fOffsetY, Float:fOffsetZ,
       Float:fRotX, Float:fRotY, Float:fRotZ,
       Float:fScaleX, Float:fScaleY, Float:fScaleZ;
    index = strval(tmp[0]);
    modelid = strval(tmp[1]);
    boneid = strval(tmp[2]);

    fOffsetX = floatstr(tmp[3]);
    fOffsetY = floatstr(tmp[4]);
    fOffsetZ = floatstr(tmp[5]);

    fRotX = floatstr(tmp[6]);
    fRotY = floatstr(tmp[7]);
    fRotZ = floatstr(tmp[8]);

    fScaleX = floatstr(tmp[9]);
    fScaleY = floatstr(tmp[10]);
    fScaleZ = floatstr(tmp[11]);

    SetPlayerAttachedObject(playerid,index,modelid,boneid,fOffsetX,fOffsetY,fOffsetZ,fRotX,fRotY,fRotZ,fScaleX,fScaleY,fScaleZ);
    SendClientMessage(playerid, 0xFFFFFFFF, "Your Saved Attachement Loaded!");
    return 1;
}
Errors:
pawn Код:
D:\Lucru\1.3 samp 0.3e\gamemodes\MAPA PALAMINO.pwn(397) : error 035: argument type mismatch (argument 1)
D:\Lucru\1.3 samp 0.3e\gamemodes\MAPA PALAMINO.pwn(395) : warning 204: symbol is assigned a value that is never used: "f"
Lines:
pawn Код:
397:    fread(string,256);
395:    new File:f =fopen(str,io_read);
Reply


Messages In This Thread
File Problem (stock) - by calin1996 - 28.06.2012, 08:21
Re: File Problem (stock) - by JaTochNietDan - 28.06.2012, 08:23
Re: File Problem (stock) - by calin1996 - 28.06.2012, 08:33
Re: File Problem (stock) - by JaTochNietDan - 28.06.2012, 08:35
Re: File Problem (stock) - by calin1996 - 28.06.2012, 08:37
Re: File Problem (stock) - by calin1996 - 28.06.2012, 09:00
Re: File Problem (stock) - by cessil - 28.06.2012, 09:04
Re: File Problem (stock) - by calin1996 - 28.06.2012, 09:09

Forum Jump:


Users browsing this thread: 3 Guest(s)