1 registered members (AndrewAMD),
678
guests, and 6
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
proc_kill - Functions with different parameters
#431647
10/21/13 16:57
10/21/13 16:57
|
Joined: Oct 2011
Posts: 1,082 Germany
Ch40zzC0d3r
OP
Serious User
|
OP
Serious User
Joined: Oct 2011
Posts: 1,082
Germany
|
Hello Today I noticed a little bug while using proc_kill. First of all, heres the code:
function test(var lol)
{
while(1)
{
DEBUG_VAR(1, 20);
wait(1);
}
}
function test(var lol, var tes)
{
while(1)
{
DEBUG_VAR(1, 20);
wait(1);
}
}
...
test(1, 5); //test(1);
proc_kill((void*)test);
If Im going to stop test(1) everything works fine, but proc_kill wont stop test(1, 5). Would be awesome to see a workarround because I know it will take some time till you release the new 3DGS version EDIT: I found a verrrry crappy workarround: Displaying the address and calculate the difference (would be here 0x163)
proc_kill((void*)(test + 0x163));
This will ONLY stop the second function. Please fix this soon
Last edited by Ch40zzC0d3r; 10/21/13 17:08.
|
|
|
Re: proc_kill - Functions with different parameters
[Re: jcl]
#431672
10/22/13 11:36
10/22/13 11:36
|
Joined: Dec 2008
Posts: 1,218 Germany
Rackscha
Serious User
|
Serious User
Joined: Dec 2008
Posts: 1,218
Germany
|
but isn't there just overloading in parameter-count but in parameter-types too? something like:
void Foo(int Arg)
{
...
}
void Foo(float Arg)
{
...
}
MY Website with news of my projects: (for example my current Muliplayer Bomberman, GenesisPrecompiler for LiteC and TileMaster, an easy to use Tile editor) Sparetime-Development
|
|
|
Re: proc_kill - Functions with different parameters
[Re: Rackscha]
#431680
10/22/13 13:16
10/22/13 13:16
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
Yes, sure. But what's the point of that remark?
Always learn from history, to be sure you make the same mistakes again...
|
|
|
Re: proc_kill - Functions with different parameters
[Re: jcl]
#431682
10/22/13 13:54
10/22/13 13:54
|
Joined: Jul 2013
Posts: 158
Feindbild
Member
|
Member
Joined: Jul 2013
Posts: 158
|
Yes, sure. But what's the point of that remark? Because it shows the problem with this approach: another proc_kill function that takes the number of the overloaded function as a parameter
|
|
|
Re: proc_kill - Functions with different parameters
[Re: FBL]
#431700
10/22/13 17:49
10/22/13 17:49
|
Joined: Apr 2007
Posts: 3,751 Canada
WretchedSid
Expert
|
Expert
Joined: Apr 2007
Posts: 3,751
Canada
|
Yes, but no one ever said anything about the arguments... Except of Racksha, that is.
Shitlord by trade and passion. Graphics programmer at Laminar Research. I write blog posts at feresignum.com
|
|
|
Re: proc_kill - Functions with different parameters
[Re: jcl]
#431711
10/22/13 20:18
10/22/13 20:18
|
Joined: Jan 2002
Posts: 4,225 Germany / Essen
Uhrwerk
Expert
|
Expert
Joined: Jan 2002
Posts: 4,225
Germany / Essen
|
For killing overloaded functions you'd need another proc_kill function that takes the number of the overloaded function as a parameter. jcl, normally I'm needling you to implement features rather than adding advice what no to do in the manual. However, in this specific case it's exactly the opposite for once: please don't implement such a proc_kill function. Such a function will result in extremely hard to maintain and fragile code.
Always learn from history, to be sure you make the same mistakes again...
|
|
|
|