Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
callClientFunc and giveItem
#1
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);
Discord: I'm not a spy...#9943.
GG: 60474243.

[Image: OsmithREV.gif]
[Image: 76561198181768479.png]
Reply
#2
remove semicolons after buckles

};

correctly
}
Reply
#3
@up, this won't help.
Squirrel says, that he don't have enought args to call this function Sad
Reply
#4
(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();
Discord: I'm not a spy...#9943.
GG: 60474243.

[Image: OsmithREV.gif]
[Image: 76561198181768479.png]
Reply
#5
Oh, well squirrel should say that arg have wrong type. I have to check it.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  items and items.xml Utautai 2 2,436 12.09.2020, 21:51
Last Post: Utautai
  GiveItem with removeItem Flowa 3 2,777 11.02.2020, 16:16
Last Post: Quarchodron
  addEvent and function of class Xardas0327 4 4,053 23.05.2016, 10:22
Last Post: Xardas0327
Question Diagonal and PPI Osmith 0 1,955 21.04.2016, 11:44
Last Post: Osmith
  Database and other Question (new team) Kemi 18 12,200 09.02.2016, 22:23
Last Post: Kemi

Forum Jump:


Users browsing this thread: 1 Guest(s)