For-loop was dead?
#1

I tried thinking and testing for hours,but I still failed to solve this.
I tried to change all the variables into PVar yesterday,when I test it by starting a race,I don't know why,the for-loop that check for any other racers was dead after looping for a few times.It show "Unknown Command" with some client messages that I wrote in the loop.All other functions works perfectly(for 1 player).
I guessed this may be something overflow,but I have no proofs for it.
I tried not to load any NPCs(I have two) in all scripts,and everything works.It means the "Unknown Command" doesn't appear.
I also tried to disable my "streamer", that will dynamically load scripts and NPCs, and everything just works.
The more strange thing is,no matter how NPCs join before or after me by using the streamer, error must occur.However, nothing wrong no matter how I kick and connect the NPCs.
Similarly, when the racing script was unloaded by the streamer when the server is just turned on and loaded by it again when I join the server, error occurs.
When I load and unload the racing script by rcon command,everything works.

All I mean is that the race script must goes wrong if I load/unload the script or the NPCs by the streamer, but nothing goes wrong when I do those things by rcon command.
I tried to check the "script streamer",but I have no proof that there's anything wrong.
Will that problem caused by OnFilterScriptInit of the racing script(the NPCs are handled in gamemode,not the racing script)?
Or just give up using and developing the streamer ?

Sorry for my bad English,but hope all of you can understand.Thanks.
Reply
#2

Quote:
Originally Posted by [ĦŁ₣
ЉǾǖŦĦЗŁΛẄ ]
Just out of interest what is this 'Script Streamer'?

problem might lay there, but to be honest I never started with pVars, I just stuck with normal variables and arrays, I saw on a post that they were slower than normal variables, don't know if that is true, someone correct me.

Sorry I couldn't help more.
Oh, I mean the script that will dynamically load/unload filterscripts,to save some memory.
Sorry for misleading you

BTW,I think PVar will be slower,although I haven't tested for it.
We need to use the function GetPVarInt(or some other functions to get value) frequently.It may require more time and CPU usage to do that.
Also,I don't know why,the memory usage are very close for both before and after using PVars...(About 20000K for full load, 10000K after the dynamic loading script is on.
Am I wrong?
Reply
#3

Thank you, but I think that lots of compatibility problems need to be solved, like those occur on me.If they're solved, I think I may release it.
BTW, is there any method to solve this?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)