Sign in to follow this  

c_despawn variable "input" is not declared


Serpens
  • Fixed

The current function in consolecommands.lua looks like this:

-- Despawn a player, returning to character select screen
function c_despawn(player)
    if TheWorld ~= nil and TheWorld.ismastersim then
        --V2C: need to avoid targeting c_spawned player entities
        --player = ListingOrConsolePlayer(player)
        if type(player) == "string" or type(player) == "number" then
            player = UserToPlayer(input)
        end
        if player == nil then
            player = c_sel() ~= nil and c_sel():HasTag("player") and c_sel() or nil
        end
        if player == nil or player.components.playercontroller == nil then
            player = ThePlayer or AllPlayers[1]
        end
        -------------------------------------------------------------------
        if player ~= nil and player:IsValid() then
            --Queue it because remote command may currently be overriding
            --ThePlayer, which will get stomped during delete
            player:DoTaskInTime(0, dodespawn)
        end
    end
end

-> when entering a string or number as player, it tries to do:
player = UserToPlayer(input)
while input is not defined.


Steps to Reproduce

see above and/or try c_despawn(1) within the game.

Sign in to follow this  


User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

This has been fixed but did not make it in time for the next hotfix, it will be in the one after.
c_findnext also had the same issue and has been fixed
Changed Status to Fixed

  • Like 1
  • Thanks 1

Share this comment


Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now