VStanced/mods
Submit a mod
Mods Guides Forum Submit a mod Log in Register

Forum

Questions, builds, help and the odd argument. The mods and guides are out front.

Fixes-GameCrashes-o...
 
Notifications
Clear all

[Sticky] Fixes-GameCrashes-other help

1,960 Posts
313 Users
0 Reactions
1.4 M Views
Robustock
(@robustock_5865)
Noble Member
Joined: 13 years ago
Posts: 1218
 

I clicked Valo City and then Take it in maps section and this pop up on the desktop



   
ReplyQuote
mindeliszz
(@mindeliszz_704)
Honorable Member
Joined: 16 years ago
Posts: 536
 

I don't remember exactly, but i think GameType refers to maps/garages/menu/ect. It could be addon fault or you replaced some game core scripts. Still it's too little information to tell you exactly, unless someone had the same crash.



   
ReplyQuote
Coprone
(@coprone_9681)
Noble Member
Joined: 13 years ago
Posts: 1288
 

So I'm attempting to add bot to my "CCgarage" track, but when clicking TAKE IT in game it crashes & there's only this in error log. I tried fixing it myself but failed, there are lines mentioned which I even don't have...

pre



   
ReplyQuote
mindeliszz
(@mindeliszz_704)
Honorable Member
Joined: 16 years ago
Posts: 536
 

sl/Scripts/game/bot.java function createCar ? i'm sure you have it. if you could post your garage code, maybe i could fix it.



   
ReplyQuote
Coprone
(@coprone_9681)
Noble Member
Joined: 13 years ago
Posts: 1288
 

Spoiler: pre



   
ReplyQuote
Bigg_Boss93
(@bigg_boss93_1370)
Member Admin
Joined: 15 years ago
Posts: 3835
 

do you have the nonus installed in your game?



   
ReplyQuote
Coprone
(@coprone_9681)
Noble Member
Joined: 13 years ago
Posts: 1288
 

Of course



   
ReplyQuote
mindeliszz
(@mindeliszz_704)
Honorable Member
Joined: 16 years ago
Posts: 536
 

Ok, i think i found it. In your code the variable "map" type is GroundRef, the createCar function requires that the map would be GameRef type. Try to change GroundRef to GameRef at line 31



   
ReplyQuote
Coprone
(@coprone_9681)
Noble Member
Joined: 13 years ago
Posts: 1288
 

It had same problem without the int defaultCar = cars.racers.Nonus:0x0006r; line

Added 58 seconds later:

# mindeliszz :
Ok, i think i found it. In your code the variable "map" type is GroundRef, the createCar function requires that the map would be GameRef type. Try to change GroundRef to GameRef at line 31

ok a sec I'll try



   
ReplyQuote
mindeliszz
(@mindeliszz_704)
Honorable Member
Joined: 16 years ago
Posts: 536
 

it's not the car problem. Anyway if changing GroundRef to GameRef doesn't work, then create new GameRef type variable.

Added 1 minute later:

Spoiler:

package java.game;
import java.io.*;
import java.util.*;
import java.util.resource.*;
import java.game.*;
import java.render.*;	//Text
import java.render.osd.*;	//Text
import java.sound.*;
import java.render.osd.dialog.*; //Dialog Window

import java.game.parts.*;
import java.game.parts.enginepart.*;

public class CCGarage extends Track
{	
	final static String MapName = "CC - Garage";
	final static String MapDescription = "Indoors garage meant for screenshots \n and other fun";
	final static String MapAuthor = "Author: Coprone";
	final static ResourceRef MapImage = new ResourceRef(Maps.Addon_Maps.CCGarage:0x0005r); // Image for track selector
	final static float	TS_Version = 1.0; // Do not change it!
	int		defaultCar = cars.racers.Nonus:0x0006r; // Default car for opponents if no custom cars found
	Bot		raceBot1;
	Vector3	raceBot1_posStart;
	Ypr		raceBot1_oriStart;

public CCGarage()
{
	posStart = new Vector3( -0.220, -1.076, -1.110 ); // Start car position
	oriStart = new Ypr( 1.600, 0.000, 0.000 ); // Start car rotation

	map = new GroundRef( Maps.Addon_Maps.CCGarage:0x00000001r );
	gr = new GameRef( Maps.Addon_Maps.CCGarage:0x00000001r );
	//nav = new Navigator( -5.317-2.64, -15.996, 2.64, maps.test_track.smallmap:0x00000001r, maps.test_track.smallmap:0x00000002r, maps.test_track.smallmap:0x00000005r, 6, 8, 10 ); // GPS map
//}
    raceBot1 = new Bot( Math.random()*59, 3, 1, 2.0, 2.0, 20.0);
    raceBot1.driverID = null;
    raceBot1.createCar( gr, GameLogic.carSaveDir + "CCgarage" );
    raceBot1.car.wakeUp();
    raceBot1.brain.queueEvent( null, EVENT_COMMAND, "AI_params 90.0 90.35" ); // make it faster
    raceBot1.car.setMatrix(new Vector3( 0.197, -0.721, 6.368 ), new Ypr (1.605, -0.161, -0.007));
}
public void StartMap()
{ // Track selector run this function when you click "TAKE IT"
	GameLogic.changeActiveSection( new CCGarage() );
}

public void enter( GameState prev_state )
{
	Frontend.loadingScreen.show();
	GfxEngine.flush();
	
	map.setWater( -100, 300.0, 50.0 );  // set water 100 meters under world orgin

	super.enter( prev_state );
}

public void exit( GameState next_state )
{

	super.exit( next_state );
}
}


   
ReplyQuote
Bigg_Boss93
(@bigg_boss93_1370)
Member Admin
Joined: 15 years ago
Posts: 3835
 

will check everything in a bit, i'm testing some stuff atm so i didnt pay much attention to it



   
ReplyQuote
Coprone
(@coprone_9681)
Noble Member
Joined: 13 years ago
Posts: 1288
 

Well now there's in the error log
Spoiler:

!Cannot parse "gr" in file "java.game.CCGarage" at line 32
!Unknown field name "gr" in file "java.game.CCGarage" at line 32
!Cannot parse "gr" in file "java.game.CCGarage" at line 37
!Unknown field name "gr" in file "java.game.CCGarage" at line 37
!Script error

Thread: THRD-RUNVMI Dummy.handleEvent
Error: parse error (2)

java.game.CCGarage:<init> (line:32)
java.game.CCGarage:StartMap (line:44)
java.game.TrackSelect:osdCommand (line:237)
java.render.osd.Gadget:sendMessage (line:211)
java.render.osd.Button:click (line:31)
java.render.Group:handleEvent (line:178)


   
ReplyQuote
mindeliszz
(@mindeliszz_704)
Honorable Member
Joined: 16 years ago
Posts: 536
 

ok ok, try this:
Spoiler:

package java.game;
import java.io.*;
import java.util.*;
import java.util.resource.*;
import java.game.*;
import java.render.*;	//Text
import java.render.osd.*;	//Text
import java.sound.*;
import java.render.osd.dialog.*; //Dialog Window

import java.game.parts.*;
import java.game.parts.enginepart.*;

public class CCGarage extends Track
{	
	final static String MapName = "CC - Garage";
	final static String MapDescription = "Indoors garage meant for screenshots \n and other fun";
	final static String MapAuthor = "Author: Coprone";
	final static ResourceRef MapImage = new ResourceRef(Maps.Addon_Maps.CCGarage:0x0005r); // Image for track selector
	final static float	TS_Version = 1.0; // Do not change it!
	int		defaultCar = cars.racers.Nonus:0x0006r; // Default car for opponents if no custom cars found
	Bot		raceBot1;
	Vector3	raceBot1_posStart;
	Ypr		raceBot1_oriStart;
	GameRef map;

public CCGarage()
{
	posStart = new Vector3( -0.220, -1.076, -1.110 ); // Start car position
	oriStart = new Ypr( 1.600, 0.000, 0.000 ); // Start car rotation

	map = new GroundRef( Maps.Addon_Maps.CCGarage:0x00000001r );

	//nav = new Navigator( -5.317-2.64, -15.996, 2.64, maps.test_track.smallmap:0x00000001r, maps.test_track.smallmap:0x00000002r, maps.test_track.smallmap:0x00000005r, 6, 8, 10 ); // GPS map
//}
    raceBot1 = new Bot( Math.random()*59, 3, 1, 2.0, 2.0, 20.0);
    raceBot1.driverID = null;
    raceBot1.createCar( map, GameLogic.carSaveDir + "CCgarage" );
    raceBot1.car.wakeUp();
    raceBot1.brain.queueEvent( null, EVENT_COMMAND, "AI_params 90.0 90.35" ); // make it faster
    raceBot1.car.setMatrix(new Vector3( 0.197, -0.721, 6.368 ), new Ypr (1.605, -0.161, -0.007));
}
public void StartMap()
{ // Track selector run this function when you click "TAKE IT"
	GameLogic.changeActiveSection( new CCGarage() );
}

public void enter( GameState prev_state )
{
	Frontend.loadingScreen.show();
	GfxEngine.flush();
	
	map.setWater( -100, 300.0, 50.0 );  // set water 100 meters under world orgin

	super.enter( prev_state );
}

public void exit( GameState next_state )
{

	super.exit( next_state );
}
}


   
ReplyQuote
Coprone
(@coprone_9681)
Noble Member
Joined: 13 years ago
Posts: 1288
 

Well, that fixed the biggest problem, but now I only got error, which I don't know any about

!member redefinition (map) at class java.game.CCGarage
!member redefinition (map) at class java.game.CCGarage


   
ReplyQuote
mindeliszz
(@mindeliszz_704)
Honorable Member
Joined: 16 years ago
Posts: 536
 

i'll leave this to the boss then 😃



   
ReplyQuote
Page 51 / 131
Share: