• Announcement: Lua.org now officially recommends this forum as a meeting place for the Lua community

Help Lua code (2 Viewers)

CDWriter

Newcomer
Joined
Nov 17, 2021
Messages
1
Reaction score
0
I tryed to pass a code in a game

Code:
function  LuaI_244288()  -- Item ID
    local RoleName = GetName( OwnerID() )
        if ReadRoleValue( OwnerID() , EM_RoleValue_Sex ) == 0 then
        
            local itemset = { 50 , ""    , { 236398 ,1 , 236399, 1, 236400,  1, 236401, 1, 236402, 1, 204073, 5 } }  -- male     
    return BaseTressureProc6( itemset , 6 )
    else
            local itemset = { 50 , ""    , { 204073 ,5 } }  -- female   
    return BaseTressureProc6( itemset , 1 )
end

every time i get " attempt to call a nil value("lua_pcall( luai_244288 )")

You should be able to tell what iam doing here giving items to a player in game but only based on Gender (male/Female) ..
 
Top