Jump to content
Vasil

[URGENT]FORGE ERROR! PLS ANSWER ASAP

Recommended Posts

Hi,it's urgent!!! My players has just discovered a bug into forging.The message given while forging is "Unable to operate,request rejected"

 

I checked the forge scripts in forge.lua and changed them , but nothing happened.

 

 

BUMP , PLEASE ANSWER ASAP

 

Vasil!

Share this post


Link to post
Share on other sites
24 minutes ago, Vasil said:

Hi,it's urgent!!! My players has just discovered a bug into forging.The message given while forging is "Unable to operate,request rejected"

 

I checked the forge scripts in forge.lua and changed them , but nothing happened.

 

 

BUMP , PLEASE ANSWER ASAP

 

Vasil!

 

It seems like a broken script somewhere in ur forging. Any lua_err?


logo-big.png   logo.png

                                   Sunny Go! Online                                                                    pko.host                                                 

Share this post


Link to post
Share on other sites
1 minute ago, Angelix said:

As @Shako said, mind sharing an image of console and lua_err.txt ? 

Console show no error, lua err

[10-16 08:38:56]./resource/script\calculate\forge.lua:1047: attempt to index field `?' (a nil value)

Share this post


Link to post
Share on other sites

Scripts:

 

function Check_StoneItemType ( Item , Stone1 , Stone2 )
--    Notice ("Check_StoneItemType")
    local Stone1Type = GetItemType ( Stone1 )
    local Stone2Type = GetItemType ( Stone2 )
    local Baoshi = 0
    local ItemType = GetItemType ( Item )
    
    if Stone1Type == 49 then
        Baoshi = Stone1
    elseif Stone2Type == 49 then
        Baoshi = Stone2
    end

    local Baoshi_ID = GetItemID ( Baoshi )
    local i = 0
    local Baoshi_TypeID = 0
    
    for i = 1 , StoneAttrType_Num , 1 do
        if Baoshi_ID == StoneTpye_ID then
            Baoshi_TypeID = i
        end
    end

    for i = 0 , 15 , 1 do
        if ItemType == StoneItemType[Baoshi_TypeID] then
            return 1
        end
        if StoneItemType[Baoshi_TypeID] == 0 then
--            Notice ("Return failed")
            return 0
        end
    end
    
--    Notice ("Return failed")
    return 0
end
 

Share this post


Link to post
Share on other sites

one of those variables/values aren't defined


logo-big.png   logo.png

                                   Sunny Go! Online                                                                    pko.host                                                 

Share this post


Link to post
Share on other sites

@Vasil find forge.lua line 1047 and see what variable it is


logo-big.png   logo.png

                                   Sunny Go! Online                                                                    pko.host                                                 

Share this post


Link to post
Share on other sites
5 minutes ago, Vasil said:

shared the whole script.

 

You didn't because this:

13 minutes ago, Vasil said:

Screenshot_87.png

Doesn't appear in the function. Something similar is in it, yet it is missing the "[ i ]"

Edited by Angelix

Share this post


Link to post
Share on other sites
1 minute ago, Angelix said:

You didn't because this:

Doesn't appear in the function. Something similar is in it, yet it is missing the "[ i ]"

so i should be

local i = math.random(2,3) ? or whut

Share this post


Link to post
Share on other sites

Are you completely using cloak? Might as well remove that for the time being till you know how to modify scripts and add it without problems.

 

Edited by Angelix

Share this post


Link to post
Share on other sites
2 minutes ago, Angelix said:

Are you completely using cloak? Might as well remove that for the time being till you know how to modify scripts and add it without problems.

 

You got FB? Can add me. "Komuro Dev", can help a bit faster and see if we can get to a solution.

Added.

Share this post


Link to post
Share on other sites

I figure "StoneItemType[Baoshi_TypeID][ i ]" is broken, because its calling an array + another value.

 

edit: nvm, that works. something else is broken.

The script he posted works 100%, it was something else outside the function.

Edited by Shako

logo-big.png   logo.png

                                   Sunny Go! Online                                                                    pko.host                                                 

Share this post


Link to post
Share on other sites
4 minutes ago, Shako said:

I figure "StoneItemType[Baoshi_TypeID][ i ]" is broken, because its calling an array + another value.

 

edit: nvm, that works. something else is broken.

The script he posted works 100%, it was something else outside the function.

Yes, I kept telling him that the error lines he gave us/me were all pointing either to commented lines or "end". Then he just told me he had place a variable's name twice somewhere else which caused an undefined variable and that he fixed it.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...