Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Forum » .ini
Re: .ini [message #447046 is a reply to message #447036] Wed, 11 May 2011 14:43 Go to previous messageGo to previous message
snazy2000 is currently offline  snazy2000
Messages: 67
Registered: December 2007
Karma:
Recruit
void mes::Load(GameObject *obj){
	std::string me;
	const char*name = Get_Player_Name(obj);
	SettingsLoader::Load();
	mes = new mes("***********.ini");
	LoadSString(me,name,"NULL",true,true,false);

	char preset[500];
	char skin[500];
	char shield[500];
	char powerups[500];
	char scripts[500];
	char scriptparam[500];
	float price = 0;
	float hp =0;
	float ap =0;
	for (int z = 1; ; ++z) {

		if (z==1||z==3||z==4)
		{
			switch(z)
			{
			case 1:
				price = INI->Get_Float(me.c_str(),StrFormat("%02d",z).c_str(),0);
			case 3:
				hp = INI->Get_Float(me.c_str(),StrFormat("%02d",z).c_str(),0);
			case 4:
				ap =  INI->Get_Float(me.c_str(),StrFormat("%02d",z).c_str(),0);
			}
		}
		else
		{
			switch(z)
			{
			case 2:
				INI->Get_String(me.c_str(),StrFormat("%02d",z).c_str(),"",preset,500);
			case 5:
				INI->Get_String(me.c_str(),StrFormat("%02d",z).c_str(),"",skin,500);
			case 6:
				INI->Get_String(me.c_str(),StrFormat("%02d",z).c_str(),"",shield,500);
			case 7:
				INI->Get_String(me.c_str(),StrFormat("%02d",z).c_str(),"",powerups,500);
			case 8:
				INI->Get_String(me.c_str(),StrFormat("%02d",z).c_str(),"",scripts,500);
			case 9:
				INI->Get_String(me.c_str(),StrFormat("%02d",z).c_str(),"",scriptparam,500);
			}
		}
	}
	if (price==0)
	{
		int pID = Get_Player_ID(obj);
		Console_Input(StrFormat("CMSGP %d 255,0,0 Request your me on the forums.",pID).c_str());
	}
	else
	{
		//KB_Purchase_Char(obj,"me",2,price,preset,hp,ap,skin,shield,powerups,scripts,scriptparam);
	}
};



struct mes: public virtual SettingsLoader{
	mes(const char *ININame) : SettingsLoader(ININame){}
	void Load(GameObject *obj);
};


Compiles fine for me.


[Updated on: Thu, 12 May 2011 00:27]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Veh Bots.
Next Topic: Rp2's Zombie Assault
Goto Forum:
  


Current Time: Fri Dec 20 02:14:33 MST 2024

Total time taken to generate the page: 0.00854 seconds