Revanchist

  • Content Count

    3
  • Joined

  • Last visited

Community Reputation

0 Neutral

About Revanchist

  • Rank
    Junior Member
...
  1. I will also add my modmain.lua, just in case modmain.lua
  2. It seems he. [00:03:44]: [string "../mods/build 0.97/modmain.lua"]:172: attempt to index local 'player' (a nil value) LUA ERROR stack traceback: ../mods/build 0.97/modmain.lua:172 in (upvalue) ThunderSpell (Lua) <169-183> inst = 116491 - revan (valid:true) player = nil ../mods/build 0.97/modmain.lua:273 in () ? (Lua) <272-274> inst = 116491 - revan (valid:true) target = nil =[C]:-1 in (method) CallRPC (C) <-1--1> scripts/networkclientrpc.lua:1070 in (global) HandleRPCQueue (Lua) <1061-1106> i = 1 fn = function - ../mods/build 0.97/modmain.lua:272 sender = 116491 - revan (valid:true) data = table: 2CA56130 tick = true scripts/update.lua:46 in () ? (Lua) <33-134> dt = 0.016640100628138 [00:03:44]: [string "../mods/build 0.97/modmain.lua"]:172: attempt to index local 'player' (a nil value) LUA ERROR stack traceback: ../mods/build 0.97/modmain.lua:172 in (upvalue) ThunderSpell (Lua) <169-183> ../mods/build 0.97/modmain.lua:273 in () ? (Lua) <272-274> =[C]:-1 in (method) CallRPC (C) <-1--1> scripts/networkclientrpc.lua:1070 in (global) HandleRPCQueue (Lua) <1061-1106> scripts/update.lua:46 in () ? (Lua) <33-134> [00:03:44]: Warning: Widget:SetFocusFromChild is happening on a widget outside of the screen/widget hierachy. This will cause focus moves to fail. Is ScriptErrorWidget not a screen? [00:03:44]: stack traceback: scripts/widgets/widget.lua:604 in (method) SetFocusFromChild (Lua) <601-626> scripts/widgets/widget.lua:623 in (method) SetFocusFromChild (Lua) <601-626> scripts/widgets/widget.lua:623 in (method) SetFocusFromChild (Lua) <601-626> scripts/widgets/widget.lua:648 in (method) SetFocus (Lua) <628-657> scripts/widgets/menu.lua:83 in (method) SetFocus (Lua) <74-85> scripts/widgets/scripterrorwidget.lua:109 in (method) OnUpdate (Lua) <102-119> scripts/update.lua:95 in () ? (Lua) <33-134> server_log.txt
  3. Hi, i not really good know english but i try. I wanna do lightning strike for my character and i wrote this code. local function ThunderSpell(inst) if not (GLOBAL.TheWorld and GLOBAL.TheWorld.ismastersim) then return end local player=GLOBAL.ThePlayer local cheksan = player.components.sanity:GetPercent() if cheksan >= .25 then player.components.health.invincible = true local pt = GLOBAL.ConsoleWorldPosition() GLOBAL.TheWorld:PushEvent("ms_sendlightningstrike", pt) player.components.sanity:DoDelta(-50) inst.AnimState:PlayAnimation("punch") player.components.health.invincible = false else player.components.talker:Say("The Force is leaving me...") end end local hk_light = GLOBAL.KEY_C AddModRPCHandler(modname, "ThunderSpell", function(inst) ThunderSpell(inst) end) if hk_light then GLOBAL.TheInput:AddKeyDownHandler(hk_light, function() local player=GLOBAL.ThePlayer if player and player.prefab=="revan" and not GLOBAL.IsPaused() and not GLOBAL.TheInput:IsKeyDown(GLOBAL.KEY_CTRL) and not GLOBAL.TheInput:IsKeyDown(GLOBAL.KEY_SHIFT) and not (player.HUD:IsChatInputScreenOpen() or player.HUD:IsConsoleScreenOpen()) then SendModRPCToServer(MOD_RPC[modname]["ThunderSpell"]) end end) end So, its work perfect when i host but when i add cave my server stops after i press button I will be glad if you can help.