Jump to content

Target Vessel: Kontrol System 2 : Can't get correct name


RROWLES2000

Recommended Posts

Hi,

Sorry if I'm missing something stupid, just trying things out looks really cool so far. Heres my code.  But I'm getting the same name for both My and Target Vessel. "Default - Name-10" for both. But the Target is set as "Default Name-15"

I hope someone can point me in the right direction.

 

Best

Rich

 

use { Vessel } from ksp::vessel
use { CONSOLE } from ksp::console

pub fn main_flight(vessel: Vessel) -> Result<Unit, string> = 
{
    CONSOLE.clear()

	const myVes = ksp::vessel
	const myTar = myVes::Vessel::target::vessel
	
	CONSOLE.print_line("This Vessel="+myVes.name)
	CONSOLE.print_line("Target Vessel="+myTar.name)
	
} 

 

Edited by RROWLES2000
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...