Author Topic: Uppl -- Ulysses Per Prop Limit. Restrict specified props to a certain number!  (Read 93029 times)

0 Members and 4 Guests are viewing this topic.

Offline LuaTenshi

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 47
  • Just your ordinary moon angel!
    • Mirai.Red
I get the following error on the console ;

Code: [Select]
[ERROR] ...s/stacker stool/lua/weapons/gmod_tool/stools/stacker.lua:76: attempt
to index global 'ent' (a nil value)
  1. LeftClick - ...s/stacker stool/lua/weapons/gmod_tool/stools/stacker.lua:76
   2. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:249

Mind pasting your code here,  or atleast lines 74 - 78, because your getting the classic nil value error wich means that ent is returning nil instead of the value you want.
I cry every time I see that I am not a respected member of this community.

Offline walalang023

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Mind pasting your code here,  or atleast lines 74 - 78, because your getting the classic nil value error wich means that ent is returning nil instead of the value you want.

Hi sorry for the delay in replying,

Here is the code (of the stacker stool);

Code: [Select]
for i=1, Count, 1 do
if (!self:GetSWEP():CheckLimit("props")) then break end
if ( !gamemode.Call( "PlayerSpawnProp", ply, ent:GetModel() ) ) then break end

if i == 1 || (Mode == 2 && Recalc == true) then
StackDir, Height, ThisOffset = self:StackerCalcPos(LastEnt, Mode, Dir, Offset)
end

NewVec = NewVec + StackDir * Height + ThisOffset
NewAng = NewAng + Rot

if !Ent:IsInWorld() then
return false //Who put just break here? Seriously? Giving the player no hint he/she's not supposed to do that?
end

I'm not sure if that's the right code, but that came from the Stacker stool from Steam workshop (converted from .gma to an addon folder).
I just put in the lines from http://forums.ulyssesmod.net/index.php/topic,923.0.html to make STacker stool compatible with UPPL.

Thank you so much XD!
Walalang023

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Stuck the updated Uppl on Github.
Experiencing God's grace one day at a time.