Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C# RPC Error when using SetTimeout #28

Open
dGxxxx opened this issue Sep 8, 2024 · 2 comments
Open

C# RPC Error when using SetTimeout #28

dGxxxx opened this issue Sep 8, 2024 · 2 comments

Comments

@dGxxxx
Copy link

dGxxxx commented Sep 8, 2024

this doesn't work

Alt.SetTimeout(() =>
        {
            Alt.Log("1231");
            var a = rpcEvent.Answer("1");
            Console.WriteLine(a);
        }, 1000);

this works:

 Alt.Log("1231");
 var a = rpcEvent.Answer("1");
 Console.WriteLine(a);

using Alt.OnScriptRPC on client-side
image

Tried also using .WillAnswer() then use Alt.EmitRPCAnswer() with the rpcEvent answer id that i get from Alt.OnScriptRPC, but I always get Answer not handled on server.

Nuget: 16.2.2

@dGxxxx
Copy link
Author

dGxxxx commented Sep 12, 2024

@dGxxxx
Copy link
Author

dGxxxx commented Oct 23, 2024

debug.zip

here is full reproduction code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant