Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » Custom c++ Scripting question
Custom c++ Scripting question [message #75963] Sun, 04 April 2004 15:28 Go to previous message
TheKGBspy is currently offline  TheKGBspy
Messages: 96
Registered: April 2003
Karma:
Recruit
lately i worked on my scripts for vengeance. they work.. but i have some problem if i do some stuff.

			preset = "none";

			while (preset == "none")
			{
				rand = Commands->Get_Random_Int(1,4);
				switch(rand)
				{
					case 1:         preset = Get_Parameter("Tree1_Preset");
									break;
					case 2:         preset = Get_Parameter("Tree2_Preset");
									break;
					case 3:         preset = Get_Parameter("Tree3_Preset");
									break;
					case 4:         preset = Get_Parameter("Tree4_Preset");
									break;
				}
			}


this is a part of my code. if i remove this part of the code and i set up the preset value by Get_Parameter("Tree1_Preset"); (or tree2 or ....) it work, but if i put my while and switch command the game freze... is that because the while and the switch freeze up the game? i remember in delphi the while stop the whole program.. until the while is finished.. i want to know if this is the same problem... and how to fix it.


Ra2: Vengeance Project lead(it's Dead... sorry)
An empty Ghost since 2005.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: C&C_Ghetto
Next Topic: scripts.dll 1.5.1/1.6
Goto Forum:
  


Current Time: Sat Jul 13 01:33:37 MST 2024

Total time taken to generate the page: 0.00688 seconds