SA-MP Forums Archive
OnGamemodeInit Called randomly? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnGamemodeInit Called randomly? (/showthread.php?tid=625439)



OnGamemodeInit Called randomly? - rt-2 - 01.01.2017

Hi,
So when I start my server, OnGamemodeInit is called, normal.
But then, every like 10 to 48h randomly, OnGamemodeInit is called again.
I only have one gamemode and I did nothing. It happens with players or not and it's really annoying.
I'm using y_hooks, YSF all the normal stuff.
It is really the "public OngamemodeInit" that is called, not a function I designed myself.
I really don't know where to start investigating.
I will never understand this language smh.

Thank you for your help if any...


Re: OnGamemodeInit Called randomly? - iLearner - 01.01.2017

If i was you... i'd open my notepad++ and search whole directory with "OnGameModeInit" word, after that i'd know where to put my hands.


Re: OnGamemodeInit Called randomly? - rt-2 - 01.01.2017

UPDATE; I have put a variable that checks if its the second time.
I have put a "printf", after 1h of play, "OnGamemodeInit" gets called indefinitely in a loop!!!!!
I got about 10 to 120 message per minutes that states that the server tried to call OnGamemodeInit.
This condition has been put JUST under "public OnGamemodeInit".
I am using the new compiler too.

Thank you


Re: OnGamemodeInit Called randomly? - rt-2 - 01.01.2017

Quote:
Originally Posted by iLearner
Посмотреть сообщение
If i was you... i'd open my notepad++ and search whole directory with "OnGameModeInit" word, after that i'd know where to put my hands.
Hi, I don't understand, is there a function "search whole directory" in notepad++?
I really need it, because windows doesn't want me to select 2 files and click open. And I have 100+ files in 15+ directories sooooooo......


Re: OnGamemodeInit Called randomly? - Spmn - 01.01.2017

It might be an YSF issue.

Are you using SetModeRestartTime or any other YSF gamemode related function?


Re: OnGamemodeInit Called randomly? - rt-2 - 01.01.2017

Quote:
Originally Posted by Spmn
Посмотреть сообщение
It might be an YSF issue.

Are you using SetModeRestartTime or any other YSF gamemode related function?
Thank you for your answer, no I am not using SetModeRestartTime, and I don't think I am using any other functions like that.

Quote:
Originally Posted by iLearner
Посмотреть сообщение
If i was you... i'd open my notepad++ and search whole directory with "OnGameModeInit" word, after that i'd know where to put my hands.
I found out a way, I discovered that 10+ files cannot be opened in one click, so anyway, I searched in all files, only some ALS and some hooks, nothing else, thank you for your suggestion.