Jump to content
Sign in to follow this  
Brothers

Can someone help me?

Recommended Posts

Hey all, 

I try to read Lua_err and i want it as clean as possible, because i think they show broken stuff?
Also when i type &misreload ingame, i want it to be clean, so for me, there are no bugs/errors.

Now i see this for example:
[07-14 21:48:54]resource/script/calculate/skilleffect.lua:16835: attempt to call global `GetPetUreLV' (a nil value)

Im this far, i know i need to go to skill effect, and read the 16835's line. I think it is looking for GetPetUreLV but it cant find anywhere in system, am i right?
 

Share this post


Link to post
Share on other sites

This means that 'GetPetUreLV' doesn't exist, you should opt-out calling the function by deleting all the calls associated.

for faster searching (If you are not using some of these tools already) you can use either VS Code or Notepad++; Notepad++ is even better searching directories and list of files for a specific content, however VS Code is sufficient if you are searching in a project/folder that's already open in your workspace.

&misreload is reloading some files, also any files that are loaded with 'dofile' function are reloaded with them; so any plugins/extensions are also reloaded, if you are not checking for already initialized tables and/or data, you will be re-initializing them which would cause problems in many cases.

Unfortunately many public extensions are poorly written and don't have any initialization checking.


Kind regards, AG.

Share this post


Link to post
Share on other sites
18 hours ago, AlGhoul said:

This means that 'GetPetUreLV' doesn't exist, you should opt-out calling the function by deleting all the calls associated.

for faster searching (If you are not using some of these tools already) you can use either VS Code or Notepad++; Notepad++ is even better searching directories and list of files for a specific content, however VS Code is sufficient if you are searching in a project/folder that's already open in your workspace.

&misreload is reloading some files, also any files that are loaded with 'dofile' function are reloaded with them; so any plugins/extensions are also reloaded, if you are not checking for already initialized tables and/or data, you will be re-initializing them which would cause problems in many cases.

Unfortunately many public extensions are poorly written and don't have any initialization checking.

Thanks for yourreply.
Can i ignore it ? Or would that cause any problems?

I seemed to fix a different lua err, which caused me that i didnt earn any exp after killing mobs.

Share this post


Link to post
Share on other sites
2 hours ago, Brothers said:

Thanks for yourreply.
Can i ignore it ? Or would that cause any problems?

I seemed to fix a different lua err, which caused me that i didnt earn any exp after killing mobs.

It will certainly cause problems, as the function is being called somewhere but the expected behavior is not returned. But you can ignore it if its from a secondary feature that you don't use.

 


"Beware of bugs in the above code; I have only proved it correct, not tried it."

- Donald E. Knuth

Share this post


Link to post
Share on other sites
23 часа назад, Brothers сказал:

Hey all, 

I try to read Lua_err and i want it as clean as possible, because i think they show broken stuff?
Also when i type &misreload ingame, i want it to be clean, so for me, there are no bugs/errors.

Now i see this for example:
[07-14 21:48:54]resource/script/calculate/skilleffect.lua:16835: attempt to call global `GetPetUreLV' (a nil value)

Im this far, i know i need to go to skill effect, and read the 16835's line. I think it is looking for GetPetUreLV but it cant find anywhere in system, am i right?
 

Try add this in function.lua

function GetPetUreLV(fairy_item)

    local strLv = GetItemAttr( fairy_item,ITEMATTR_VAL_STR )
    local conLv = GetItemAttr( fairy_item,ITEMATTR_VAL_CON )
    local agiLv = GetItemAttr( fairy_item ,ITEMATTR_VAL_AGI )
    local dexLv = GetItemAttr( fairy_item,ITEMATTR_VAL_DEX )
    local staLv = GetItemAttr( fairy_item ,ITEMATTR_VAL_STA )
    
    return strLv + conLv + agiLv + dexLv + staLv

end

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.

Sign in to follow this  

×
×
  • Create New...