Vehicle doesn't spawn
#7

Quote:
Originally Posted by AstroPoid
Посмотреть сообщение
From my silly experince.
Don't return break all incoming values and cancel all perivous action? unless you didn't control it with conditional (if)
may i ask you to try it without if it works ?
The return does not make any difference here. It's at the very end of the block and the other block cannot be executed even if it continues to run (the else cannot execute, since the if did execute).

Furthermore, a return does stop the current function from executing but it does NOT cancel any previous actions. That's impossible.

Also, OP said it didn't run further than print("2"), then how would the return play a role?

If code does not continue to run without the use of return, break or continue (which were not used anywhere near the print "2") there are most likely only 2 causes:

- An error that stops the execution for good reasons (most likely Array index out of bounds)
- An Infinite Loop

Since there is no loop, you must look for an error.
If you have crashdetect, see crashs.log. If you don't, install it and you will see where and what error occured.
Reply


Messages In This Thread
Vehicle doesn't spawn - by IndependentGaming - 21.02.2018, 19:55
Re: Vehicle doesn't spawn - by Kaperstone - 21.02.2018, 20:13
Re: Vehicle doesn't spawn - by IndependentGaming - 21.02.2018, 20:16
Re: Vehicle doesn't spawn - by IndependentGaming - 22.02.2018, 00:21
Re: Vehicle doesn't spawn - by AstroPoid - 22.02.2018, 00:26
Re: Vehicle doesn't spawn - by AstroPoid - 22.02.2018, 00:31
Re: Vehicle doesn't spawn - by NaS - 22.02.2018, 00:42
Re: Vehicle doesn't spawn - by Mugala - 22.02.2018, 11:52
Re: Vehicle doesn't spawn - by IndependentGaming - 22.02.2018, 13:29
Re: Vehicle doesn't spawn - by IndependentGaming - 22.02.2018, 14:05

Forum Jump:


Users browsing this thread: 2 Guest(s)