Gothic Online Forums
callClientFunc and giveItem - Printable Version

+- Gothic Online Forums (https://archive.gothic-online.com)
+-- Forum: Scripting (English) (https://archive.gothic-online.com/forum-11.html)
+--- Forum: Scripting Help (https://archive.gothic-online.com/forum-12.html)
+--- Thread: callClientFunc and giveItem (/thread-1112.html)



callClientFunc and giveItem - Osmith - 18.02.2016

What could be the problem?
Code:
local file = fileOpen("Database/Inventory/" + getPlayerName(pid) + ".txt","r+");
    if (file)
    {
        for(local i = 0; i < 120; ++i)
        {
            local item = fileRead(file);
            local amount = fileRead(file);
            local equipped = fileRead(file);
            if (item)
            {
                print(item + " " + amount + " " + equipped);
                callClientFunc(pid,"giveItem",item,amount);
            };
        };
    };
    fileClose(file);



RE: callClientFunc and giveItem - muu - 18.02.2016

remove semicolons after buckles

};

correctly
}


RE: callClientFunc and giveItem - Bimbol - 18.02.2016

@up, this won't help.
Squirrel says, that he don't have enought args to call this function Sad


RE: callClientFunc and giveItem - Osmith - 18.02.2016

(18.02.2016, 12:58)Bimbol Wrote: @up, this won't help.
Squirrel says, that he don't have enought args to call this function Sad

Solved the problem: amount.tointeger();


RE: callClientFunc and giveItem - Bimbol - 18.02.2016

Oh, well squirrel should say that arg have wrong type. I have to check it.