Game Development Community

Pref::player::block = "DefaultCar"; does not work

by CodingChris · in Torque Game Engine · 11/11/2007 (3:45 am) · 5 replies

Hi,
I've got a pref, $pref::player::block and I want to set the value to "DefaultCar", but that does not work... My code:
$pref::player::block = "DefaultCar";
this sets $pref::player::block to"\c027"...
Does anyone know whats wrong here?

#1
11/24/2007 (8:58 am)
Nobody an idea?
#2
11/24/2007 (9:02 am)
Wat exactly is this prefs function in the game
#3
11/24/2007 (9:26 am)
It's used to create a wheeledvehicle:
%car = new WheeledVehicle() {
      dataBlock = $pref::Player::block;
      client = %this;
   };
#4
11/24/2007 (9:28 am)
Try taking out the quotes in the pref

$pref::player::block = DefaultCar;
#5
11/24/2007 (9:35 am)
Does not work. My result: $pref::player::block = "\c1\c028";