Author Topic: UPS at GeoForts  (Read 2644 times)

0 Members and 2 Guests are viewing this topic.

Offline Stoned

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
UPS at GeoForts
« on: November 04, 2008, 06:35:30 AM »
Well, i know that UPS is made for SandBox, but it works pretty well at GeoForts too.

My Problem is, that if someone leaves the server, the props doesn't get free'd.

I looked into player_leave.lua but it doesn't helped very much :/

Any ideas of fixing this?


Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: UPS at GeoForts
« Reply #1 on: November 04, 2008, 04:38:16 PM »
Any errors in console?
Experiencing God's grace one day at a time.

Offline Stoned

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: UPS at GeoForts
« Reply #2 on: November 05, 2008, 05:47:28 AM »
nope :/

€dit: if you want to test it yourself -> 217.168.153.250:27080
« Last Edit: November 05, 2008, 10:18:35 AM by Stoned »

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UPS at GeoForts
« Reply #3 on: November 05, 2008, 04:05:11 PM »
I'd suspect if you have the latest release our UPS that it might be an addon conflict.
Worst case, the game mode itself.
If the addon or code that (may be)/is causing conflict isn't properly releasing the player disconnect hook, that prevents all other scripts from running.

Do your props release when in Sandbox mode?
If so, that points to gamemode.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Stoned

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: UPS at GeoForts
« Reply #4 on: November 06, 2008, 04:23:17 AM »
function GM:PlayerDisconnected(pl)
   self:ClosePlayer(pl,true)
end

the disconnect function :/

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: UPS at GeoForts
« Reply #5 on: November 06, 2008, 07:51:03 PM »
Well, I found this [ http://code.google.com/p/geoforts/source/browse/trunk/gamemodes/geoforts/gamemode/init.lua?r=3 ] while searching for google term "self:PlayerClose"
It also has on that page the actual "PlayerClose" function. (See line 920)

I'm not experienced enough to know exactly what of the following will fix it, so am making educated guesses.
Try the following, in this order;
1) in that bit of player disconnect code, before the last 'end', add 'return'
Code: [Select]
function GM:PlayerDisconnected(pl)
   self:ClosePlayer(pl,true)
return
end
Restart server.
See if that breaks anything, and helps UPS.
I'm thinking that is the best bet and still not break anything.

If that doesn't work, try adding to the actual ClosePlayer function at it's very end the word return.
If your gamemode code matches the google links (which might be out of date), before 942,  you'd also add 'return'
I'm not going to post the entire code bit in case it would be different. Just look at the google link above and you should be able to find where to insert 'return'
Do that only if adding the first return doesn't work.

[rant]
To be honest, not using return on most hooks, in my opinion, is just sloppy.
Too many addons rely on hooks. Unless you just NEED to keep other addons from running, hooks should return with no modification to the original data.
[end rant]
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming