Bugreport: RemoveBuildingForPlayer does not work
#1

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
Reply
#2

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.
Reply
#3

OK, I found the problem. It is not possible to use "RemoveBuildingForPlayer" in OnPlayerConnect. That is why the filterscript is working.
Reply
#4

Quote:
Originally Posted by Mr_Brox
Посмотреть сообщение
OK, I found the problem. It is not possible to use "RemoveBuildingForPlayer" in OnPlayerConnect. That is why the filterscript is working.
I have seen this a few times but not often.
Reply
#5

It's likely you have a return 0 somewhere in a OnPlayerConnect() callback the culprit is probably fsdebug if you have it loaded.
Reply
#6

No, I have only "return 1;" in OnPlayerConnect.
Reply
#7

Check ALL filterscripts if you have fsdebug loaded it has return 0; in the code for some reason.
Reply
#8

I don't use any filterscripts. Only my includes and my self written script.
Reply
#9

Try and use SendClientMessage right before you call RemoveBuildingForPlayer. This way you know if the code is actually executed.
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)