Posts: 12
Threads: 2
Joined: Aug 2012
Reputation:
0
Hi,
after I updated my test server on version 0.3.7 RC 1, the function "RemoveBuildingForPlayer" has no effect. The objects are still displayed.
// Edit: Sorry, wrong category. It would be nice if someone can move this thread to "Bugreports".
Best Regards
Mr_Brox
Posts: 213
Threads: 14
Joined: May 2007
Reputation:
0
I had troubles with CreateObjectForPlayer aswell, I had to reload stunt_island everytime because when someone else connected they couldn't see island objects, same with zombotech, the original building won't get removed unless I reload the filterscript.
Posts: 12
Threads: 2
Joined: Aug 2012
Reputation:
0
OK, I found the problem. It is not possible to use "RemoveBuildingForPlayer" in OnPlayerConnect. That is why the filterscript is working.
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
It's likely you have a return 0 somewhere in a OnPlayerConnect() callback the culprit is probably fsdebug if you have it loaded.
Posts: 12
Threads: 2
Joined: Aug 2012
Reputation:
0
No, I have only "return 1;" in OnPlayerConnect.
Posts: 4,885
Threads: 57
Joined: Jun 2012
Reputation:
0
Check ALL filterscripts if you have fsdebug loaded it has return 0; in the code for some reason.
Posts: 12
Threads: 2
Joined: Aug 2012
Reputation:
0
I don't use any filterscripts. Only my includes and my self written script.
Posts: 1,052
Threads: 46
Joined: Jan 2010
Reputation:
0
Try and use SendClientMessage right before you call RemoveBuildingForPlayer. This way you know if the code is actually executed.
Posts: 12
Threads: 2
Joined: Aug 2012
Reputation:
0
It worked with 0.3z R4 but not with 0.3.7 RC 1. But I don't care. I've already solved it. I placed the RemoveBuildingForPlayer code in OnPlayerRequestClass.