Thread: [Solved] loop entitys
View Single Post
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-18-2022 , 17:05   Re: loop entitys
Reply With Quote #64

Quote:
Originally Posted by MrPickles View Post
Let me make it more clear:

PHP Code:
__int_Array = { 02// here clearly I see that the size of the array is 3 and his values, is the same as the decompiler sees
__int_Array = { 024// here clearly I see that the size of the array is 4 and his values, is the same as the decompiler sees

myFunction( Array[] ) // How will I know the size of the array that will be put here each time that i want to use it?
{
       static 
len 
       len 
sizeof(myArray// I use this function to get the size of the array

Huh, you're not referencing the code that I posted. The size of the passed array is passed into the function as the second argument.

Quote:
Originally Posted by MrPickles View Post
what i said is that every time you use the function, the function will have to get the size of the array according to the array you put in it, like you did in your previous loop
It does this at compile time as the decompiled code shows.

Quote:
Originally Posted by MrPickles View Post
As I was saying, you keep trying to prove something that you can't
I proved my statement. A bunch of your statements don't make any sense so it's clear you're talking about something that I've never claimed to be true.

Quote:
Originally Posted by MrPickles View Post
It's obvious that you lowered the size of the arrays
What are you talking about? I didn't do anything related to "lowering the size of the arrays", whatever that means.

Quote:
Originally Posted by MrPickles View Post
it's not the first time I've used a decompiler, but it seems that you did, even so, if it weren't the case, simply
removing sizeof saves a lot of data, which proves my theory
Removing sizeof doesn't "save a lot of data", why in the world would you think that? What theory are you trying to prove?

Quote:
Originally Posted by MrPickles View Post
"my earlier statements"

As I said, it is one thing is to obtain the size of the array depending on what you put in it and when you use it, and another is for the decompiler to show you the data of the array that you put in it, as we all see, your declaration has nothing to do with the topic
What?? The decompiler doesn't show you the data in the array. It shows the pointer to the array.

Quote:
Originally Posted by MrPickles View Post
The main issue was that, every time the function is used, the size of the array has to be obtained, for that the function, and what you say is all that we see with the naked eye, both the decompiler and the source, not when said function is used, because the size will be obtained according to the array when you put it and when that function is used
The size of the array is determined at compile time (as proven by the decompiled output) and is used as the function parameter that had the sizeof defined as the default value.

Quote:
Originally Posted by MrPickles View Post
The only thing you do is prove that I was right, I really have a lot to do, and you definitely have a lot to learn basic things, I'll leave you "high level" XD
I'm not proving that you're right. I've proven that my statement about the size of the array being determine at compile time is correct. I'm not sure what you think you're arguing about.

I know plenty of "basic things", maybe you need to learn how to comprehend english.
__________________
fysiks is offline