#String array with a length of 3 believes it has a length of 1

1 messages · Page 1 of 1 (latest)

stiff lynx
#

When set to Debug.Log it's length this is the output:

cerulean basalt
#

Send the full script, though I'm 90% sure i know the issue

stiff lynx
#

ok

#

also you messaged as i closed the project lol

#

upon opening it seems to work

#

ill try a couple things and get back to you

#

why is this an error now?!

#

idk if this makes sense

#

but i think its a visual studio bug

#

like

#

it isnt updating the scripts when i compile and go back to unity

#

also script is longer than discord allows so ill need to send as a file if you still want that

#

i switched around which lines were commented out and unity refused to acknowledge this change and is still running as though the debug.log is still there

#

also what is this?!

#

i havent changed anything related to that part of the code and all of a sudden it is an error

#

how did the problem get worse

#

i fixed the float thing

#

there was a typo smh

#

it all works now

#

somehow

#

i

#

what?!

#

i didnt change anything

#

is my pc just stupid?

cerulean basalt
#

Just send the code in a code block

#

It is very rare that it's a bug with the IDE

#

The sooner you stop blaming tools for your mistakes the better off you'll be, you'll approach things more logically

#

[]cb

late creekBOT
#

Use codeblocks to send code in a message!

To make a codeblock, surround your code with ```
To use C# syntax highlighting add cs after the three back ticks.

For example:
```cs
Console.WriteLine("Hello World");
```

Produces:

Console.WriteLine("Hello World");

To send lengthy code, paste it into https://paste.myst.rs/ and send the link of the paste into chat.

stiff lynx
#

ive already solved the problem

#

also

#

why are you so condescending?

cerulean basalt
#

I'm not being condescending, I'm telling you the truth

#

If you blame your editor/tools for issues you're likely going to overlook your own mistakes time and time again, when in reality it's often simple issues

#

Also a properly formulated question with supporting information will usually result in people being more willing to help

stiff lynx
glass spade
#

When that happens it usually means that you didn't save the script from the IDE. Unity reads and compiles your scripts from hard memory, not from RAM.