Latch:
the PrintPtr(Ptr) Function returns a string, well Technically it returns the pointer but because dbc thinks it is returning a string(because endfunction is a string) you can assign it to a string variable and it will set that string to the string that that pointer points to. although if you have a bad pointer you will get a "Severe Exeption" error. in other words a "Access reading violation" in vc++ talk lol.
Havn't actually tested it with any dll's yet but that does make sense(the string length thing)
Just to make it clear GetStrPtr() Returns the pointer to the STATIC STRING VARIABLE FROM THE FUNCTION. NOT THE POINTER TO THE ACTUAL STRING YOU INPUTED. So This:
Ptr1 = GetStrPtr("My String One")
Ptr2 = GetStrPtr("My String Two")
Print PrintPtr(Ptr1)
Print PrintPtr(Ptr2)
Would Print:
My String Two
My String Two
Just had to clarify
Although i have tested it and if you assign a string to the pointer then set the string to a different string it doesn't change the string in the function. i am geussing when you use the operator = it copies the string from the right hand string to the left hand string, and doesn't assign the pointer like the default char*(character pointer or in other words a string) data in c++ where if you used = it would assign the pointer.
The Comet: Bn2: Pictionary:
I am geussing what this is doing is creating a variable called "1" but if the variables are checked before the numbers then that would be interpreted as a variable not a number. it all depends how dbc translates it. thats my geuss that it thinks that 1 is now a variable and not a number.
Pictionary:
Quote: "if you think about you could use something like hat1=2 then print hat1 and it would be 2"
From the looks of that you are just using a regular variable. they are talking about changing values of numbers. so like change the value of 1 to 5 and the value of 5 to 100. with that this:
1 + 5 = 6
would be:
1 + 5 = 105
edit:
This function does have uses, i just found a way to use it in my Gui Functions. that way i can pass a string when the procedures only take integers! Just saying i already found a use. Yay
New Site! Check it out \/