-
Danni
- Posts: 59
- Joined: Sat Nov 09, 2013 6:24 pm
#21
Post
by Danni » Mon Jan 27, 2014 10:41 am
![Confused :?](./images/smilies/icon_e_confused.gif)
I can't read that message, cause that's not english
but my guess is, that some code in your LOAD does not work.
wait
-
Danni
- Posts: 59
- Joined: Sat Nov 09, 2013 6:24 pm
#22
Post
by Danni » Mon Jan 27, 2014 10:52 am
change
Code: Select all
function findMyItem()
local itemhere = false
repeat
item = player:findNearestNameOrId(120431) -- Whatever the Name or Id is for the item you want to use
if item and 50 > distance(item,player) then
player:target_Object(120431)
itemhere = true
into
Code: Select all
function findMyItem()
local itemhere = false
repeat
item = player:findNearestNameOrId(120431) -- Whatever the Name or Id is for the item you want to use
if item and 50 > distance(item,player) then
player:target_Object(120431)
itemhere = true
end
-
Miworax
- Posts: 57
- Joined: Fri Jan 24, 2014 9:46 am
#23
Post
by Miworax » Mon Jan 27, 2014 11:07 am
it dont work
![Sad :(](./images/smilies/icon_e_sad.gif)
dont know that error error message in english, but something is wrong with the waypointlist.lua, he cant run the lua codes or something like that
-
Miworax
- Posts: 57
- Joined: Fri Jan 24, 2014 9:46 am
#24
Post
by Miworax » Mon Jan 27, 2014 1:18 pm
maybe someone else has an idea?
-
Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
#25
Post
by Bill D Cat » Mon Jan 27, 2014 1:39 pm
You didn't include my entire function. "repeat" without the "until" line or the final "end" to close the function will each cause an error.
Code: Select all
function findMyItem()
local itemhere = false
repeat
item = player:findNearestNameOrId(xxxxxx) -- Whatever the Name or Id is for the item you want to use
if item and 50 > distance(item,player) then
player:target_Object(item.Id)
itemhere = true
else
yrest(5000)
end
until itemhere == true
end
-
Miworax
- Posts: 57
- Joined: Fri Jan 24, 2014 9:46 am
#26
Post
by Miworax » Mon Jan 27, 2014 1:49 pm
and then in the waypoint part i must write "findMyItem()" , right ?
-
Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
#27
Post
by Bill D Cat » Mon Jan 27, 2014 1:50 pm
That would be correct.
-
Miworax
- Posts: 57
- Joined: Fri Jan 24, 2014 9:46 am
#28
Post
by Miworax » Mon Jan 27, 2014 3:21 pm
9:19pm - ...rs/Angrod/Desktop/Rom/scripts/rom/classes/player.lua:3610: bad argum
ent #1 to 'pairs' (table expected, got nil)
that comes if he is at the first "findMyItem()</waypoint>"
-
Bill D Cat
- Posts: 555
- Joined: Sat Aug 10, 2013 8:13 pm
- Location: Deep in the Heart of Texas
#29
Post
by Bill D Cat » Mon Jan 27, 2014 3:37 pm
Code: Select all
/scripts/rom/classes/player.lua:3610
That line of code is right in the middle of the function:
Code: Select all
-- auto interact with a merchant
function CPlayer:merchant(_npcname, _option, _evalfunc)
So I have no idea what this would have to do with the function that I wrote for you.
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#30
Post
by rock5 » Mon Jan 27, 2014 11:32 pm
I'll go out on a limb here and assume Mirowax is using a modified version of player.lua. That's why the error number doesn't line up with a "pairs" command. Most likely then the error is happening in the findNearestNameOrId function as that is what is used in Bill D Cats code. Which leads me to the conclusion that Mirowax used the code exactly as written, ie. he left xxxxxx unchanged. That would cause a "pairs" error.
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
Miworax
- Posts: 57
- Joined: Fri Jan 24, 2014 9:46 am
#31
Post
by Miworax » Tue Jan 28, 2014 8:09 am
my english istn so good that i can understand this
![Sad :(](./images/smilies/icon_e_sad.gif)
-
rock5
- Posts: 12173
- Joined: Tue Jan 05, 2010 3:30 am
- Location: Australia
#32
Post
by rock5 » Tue Jan 28, 2014 10:00 am
Did you remember to change xxxxxx to 120431?
- Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
- I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
- How to: copy and paste in micromacro
________________________
Quote:
- “They say hard work never hurt anybody, but I figure, why take the chance.”
-
Miworax
- Posts: 57
- Joined: Fri Jan 24, 2014 9:46 am
#33
Post
by Miworax » Tue Jan 28, 2014 10:25 am
let me check and try some minutes
-
Miworax
- Posts: 57
- Joined: Fri Jan 24, 2014 9:46 am
#34
Post
by Miworax » Tue Jan 28, 2014 3:21 pm
yeah, it work, thanks all
![Smile :)](./images/smilies/icon_e_smile.gif)
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 4 guests