AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting (https://forums.alliedmods.net/forumdisplay.php?f=107)
-   -   Solved [TF2] Plugin without any code changes now crashes (https://forums.alliedmods.net/showthread.php?t=312194)

manicogaming 11-20-2018 15:31

[TF2] Plugin without any code changes now crashes
 
So I was editing a plugin and everything was going fine and just earlier today I tested it and it was working, now if I test it with the same code and everything the game just crashes to desktop without any error information or logs.

Any ideias on how I can fix such issue?

Facksy 11-20-2018 15:33

Re: [TF2] Plugin without any code changes now crashes
 
...If you dont post the script its going to be hard to see what is wrong

manicogaming 11-20-2018 15:48

Re: [TF2] Plugin without any code changes now crashes
 
1 Attachment(s)
Quote:

Originally Posted by Facksy (Post 2624930)
...If you dont post the script its going to be hard to see what is wrong

Yeah, you're probably right. Sorry, but it is quite big.

PC Gamer 11-20-2018 19:17

Re: [TF2] Plugin without any code changes now crashes
 
Question...

Why use:
Code:

int rnd = GetRandomUInt(0,49);

int GetRandomUInt(int min, int max)
{
        return RoundToFloor(GetURandomFloat() * (max - min + 1)) + min;
}

Instead of:
Code:

int rnd = GetRandomInt(1,49);

manicogaming 11-20-2018 19:45

Re: [TF2] Plugin without any code changes now crashes
 
Quote:

Originally Posted by PC Gamer (Post 2624954)
Question...

Why use:
Code:

int rnd = GetRandomUInt(0,49);

int GetRandomUInt(int min, int max)
{
        return RoundToFloor(GetURandomFloat() * (max - min + 1)) + min;
}

Instead of:
Code:

int rnd = GetRandomInt(1,49);

I don't know, that's not the part that I'm editing.


All times are GMT -4. The time now is 09:33.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.