Home » Renegade Discussions » Mod Forum » .ini
Re: .ini [message #447245 is a reply to message #447011] |
Sat, 14 May 2011 23:59 |
robbyke
Messages: 348 Registered: September 2010 Location: Belgium
Karma:
|
Recruit |
|
|
if it cant open the ini it works but it doesnt when it tries to open the ini
i had placed the ini in both dirs
ive tried to send messages to pinpoint where exactly that the program crashes and as soon as it needs to open the .ini it crashes
OMG OMG i fixed it =D
Toggle Spoiler
void KB_Purchase_Me(GameObject *obj)
{
const char*name = Get_Player_Name(obj);
int pID = Get_Player_ID(obj);
Console_Input(StrFormat("CMSGP %d 255,0,0 test0",pID).c_str());
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;
INIClass* ini = Get_INI("mes.txt");
if (ini)
{
Console_Input(StrFormat("CMSGP %d 255,0,0 test1",pID).c_str());
price =ini->Get_Float(name,"01",0);
ini->Get_String(name,"02","",preset,500);
hp =ini->Get_Float(name,"03",0);
ap =ini->Get_Float(name,"04",0);
ini->Get_String(name,"05","",skin,500);
ini->Get_String(name,"06","",shield,500);
ini->Get_String(name,"07","",powerups,500);
ini->Get_String(name,"08","",scripts,500);
ini->Get_String(name,"09","",scriptparam,500);
}
if (price==0)
{
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);
}
}
if i implemented it as a normal function it stopped crashing =D final test was worth it thanks for all the help ^^
Owner of kambot TT server
kambot.freeforums.org
[Updated on: Mon, 16 May 2011 13:45] Report message to a moderator
|
|
|
|
|
.ini
By: robbyke on Wed, 11 May 2011 07:21
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Wed, 11 May 2011 09:33
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Wed, 11 May 2011 13:50
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Wed, 11 May 2011 13:54
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Wed, 11 May 2011 22:37
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Thu, 12 May 2011 08:51
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Thu, 12 May 2011 11:31
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Thu, 12 May 2011 12:00
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Sat, 14 May 2011 05:24
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Sat, 14 May 2011 06:31
|
|
|
Re: .ini
|
|
|
Re: .ini
|
|
|
Re: .ini
By: robbyke on Sat, 14 May 2011 23:59
|
Goto Forum:
Current Time: Fri Dec 20 07:42:58 MST 2024
Total time taken to generate the page: 0.01422 seconds
|