SA-MP Forums Archive
[Help] Streamer (I think) - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: [Help] Streamer (I think) (/showthread.php?tid=191981)

Pages: 1 2


[Help] Streamer (I think) - joeri55 - 21.11.2010

I got a problem that really needs to be solved. I'm using the ignato streamer plugin and it always worked like it used to do.. Now I had a PM from ServerFFS that I was using to much cpu? I don't know if this is a problem for the streamer..? I'm using the GF script with a really other twist but that's not the thing.. It always worked and since I just restarted the server and updated some things this happend:







I really don't know what the problem could be, could anyone know what the heck this is? I really need help tho I run a server with a lot of players and I don't want this to get a really big problem.

Almost everything works like it should but the main building carter_drug (or something like that) ain't loading does anyone knows what I'm doing wrong? I never touched the settings of the streamer and .cfg.. Should I change something or..?

Since my other scripter ain't online.. I also can't ask it to him that's why I'm asking you guys.


Re: [Help] Streamer (I think) - Retardedwolf - 21.11.2010

Simply not use the streamer, or you could use a alternative.


Re: [Help] Streamer (I think) - joeri55 - 21.11.2010

I need a streamer 'cause I'm using more then 400 objects, it's Prison Roleplay. And it used to work before?! How could it don't work anymore? I'm like wtf.. serious!


Re: [Help] Streamer (I think) - willsuckformoney - 21.11.2010

Maybe your damn file save is taken your room


Re: [Help] Streamer (I think) - Retardedwolf - 21.11.2010

You can only use up to 400 objects even if you have a streamer or anything may happen. Such as crashes, spam warning opcodes, sudden object disappearance, flashy objects.


Re: [Help] Streamer (I think) - joeri55 - 21.11.2010

I got like 1200 registerd players and.. 1200 dini files (they only save the fightstyle..). ServerFFS mailed me this, this evening:

Quote:

Dear Joeri Detering,

We have restarted your server (#9166 - SA-MP Server) because it was using 101% CPU (peaked at 128% CPU) and 0.3% RAM for a period of time.
Considering your server only has 50 Players, this usage is way too high and has a bad influence on other servers we are hosting.
You should either optimize your custom settings (maps, gamemodes, addons, etc.) or, if you don't know how to do so, reinstall your server and run it on it's default settings.

Should you have any questions regarding this, please do not hesitate to open a support ticket:
https://www.serverffs.com/control/support/tickets/new/

Regards,
serverFFS

Do I need to delete some files from my server?.. or the GM?


Re: [Help] Streamer (I think) - Retardedwolf - 21.11.2010

Dini is outdated, use MySQL, SQLite, djSon or y_ini.


Re: [Help] Streamer (I think) - Austin - 21.11.2010

It sounds like your server had frozen up maybe? Maybe just got stuck in a loop for a long time. Look into the time of the email and check your server logs.


Re: [Help] Streamer (I think) - joeri55 - 21.11.2010

Does the .dini the damage or something? It got restarted, but I dunno if it got stuck or something. But that's something diffrent then objects diss-appearing right? I'm now deleting some un-used scriptfiles, dini's and other things will that probally help?


Re: [Help] Streamer (I think) - Retardedwolf - 21.11.2010

Quote:
Originally Posted by joeri55
Посмотреть сообщение
Does the .dini the damage or something? It got restarted, but I dunno if it got stuck or something. But that's something diffrent then objects diss-appearing right? I'm now deleting some un-used scriptfiles, dini's and other things will that probally help?
Checking your things for efficiency and converting to better file saving systems would help.


Re: [Help] Streamer (I think) - joeri55 - 21.11.2010

Alright, I hope it helps, thanks for your help!


Re: [Help] Streamer (I think) - Lorenc_ - 21.11.2010

This could be client side although use a streamer like xObjects (I love it) It's could hold more objects than 400 and stream them


Re: [Help] Streamer (I think) - joeri55 - 21.11.2010

I just deleted the streamer and changed the dynamicobject to createobject and I STILL got this problem wtf?


Re: [Help] Streamer (I think) - Austin - 21.11.2010

100% cpu usage spiking at 120%. Sounds more like a stuck while loop to me, not a streamer issue.


Re: [Help] Streamer (I think) - joeri55 - 21.11.2010

Can this happen because of a animation?


Re: [Help] Streamer (I think) - joeri55 - 21.11.2010

I got this on playerupdate, can this cause the problem?
Код:
                format(var, 64, "Locked=%d\n",PlayerInfo[playerid][pLocked]);fwrite(hFile, var);
                fclose(hFile);
                GetPlayerName(playerid,pnamos,30);
                dini_IntSet(pnamos,"FightStyle", FightStyle[playerid]);
                new Float:health;
                GetPlayerHealth(playerid, health);
                if(health < 20.0)
                {
                GameTextForPlayer(playerid, "~w~You're wounded~n~~r~wait or use /acceptdeath", 5000, 1);
                PlayerTied[playerid] = 1;
                TogglePlayerControllable(playerid, 0);
                ApplyAnimation(playerid, "CRACK", "crckdeth2", 4.1, 0, 0, 0, 0, 0);
                }
The animation is looping..

I just deleted that above here, still the bug is appearing.


Re: [Help] Streamer (I think) - Retardedwolf - 21.11.2010

Oh no, You're reading and writing files with the file functions in OnPlayerUpdate. Put those in a timer.



[This forum requires that you wait 120 seconds between posts. Please try again in -1 seconds.] < -


Re: [Help] Streamer (I think) - westorz - 21.11.2010

-Steve Burnside
I seen it,i just think it's the small update you said about


Re: [Help] Streamer (I think) - joeri55 - 21.11.2010

I deleted that, and still I'm getting the error..

This is my onplayerupdate:..

http://pastebin.com/wM3gJMqb

Maybe you or anyone-else knows the problem..


Re: [Help] Streamer (I think) - Retardedwolf - 21.11.2010

Holy shit, You're saving files in OnPlayerUpdate? I just give you a medal. /me hands Raymond a medal. /do Medal says : "You have created the most efficient script ever in the world."

Save it in onPlayerDisconnect.

Quote:

This callback is called very frequently per second per player, only use it when you know what it's meant for.

Saving files in OnPlayerUpdate is not efficient at all. You're saving it around 38 times a second. I'm amazed it didn't already send you those errors when you had only 5 players online.