Jump to content

Timeout when loading files via LatentEvents


^.^

Recommended Posts

Posted

Hello Community,

I am working on a loading system for downloading files. Sometimes when I download music or textures via the system I get network trouble.

That's the line for triggering the event to the server.

triggerLatentServerEvent("startFileDownload", 900000, getLocalPlayer(), serverFile, clientFile, gameModeID) 

I am downloading files at a size of about 3-4 MB.

Thanks for your help

Jake.png
Posted

That resource will cause the same problem as he mentioned, I know this because it happened on my server, and so far, couldn't find a way to fix this, so maybe you should wait for the MTA downloadFile function.

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

That happens because you trigger an event many times with much data (not really sure about it). It may get solved if you make a delay between each trigger.

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted

You're welcome :P

"[...] If you don’t love it, if you’re not having fun doing it, you don’t really love it, you’re going to give up." - Steve Jobs, 2007

Posted

I thought the solution would be more difficult. At the end all files get downloaded within some seconds without a timeout.

Jake.png

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...