SA-MP Forums Archive
INI_String - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: INI_String (/showthread.php?tid=281951)



INI_String - AntiGen - 08.09.2011

How Can Them Be Affected With These Lines:

Код:
(421) : error 017: undefined symbol "name"
(421) : error 017: undefined symbol "value"
(422) : error 017: undefined symbol "name"
(422) : error 017: undefined symbol "value"
	 
INI_String("Admin", Admin1, 48); // 421
INI_String("Reason", Reason, 128); // 422
I Know How To Define But There Is No "Name" Or "Value" In My Script -.-


Re: INI_String - park4bmx - 08.09.2011

are you sure that's from your script not the include ?
becosue in that case i think
the name will be Admin and the value 48
check if the errors are coming from your script
EDIT
try what MadeMan told u


Re: INI_String - MadeMan - 08.09.2011

Quote:
Originally Posted by AntiGen
Посмотреть сообщение
I Know How To Define But There Is No "Name" Or "Value" In My Script -.-
Actually you do, because:

pawn Код:
#define INI_String(%1,%2,%3) \
        if(!strcmp((%1),name,true))return strcpy(%2,value,%3)



Re: INI_String - AntiGen - 08.09.2011

That Does Nothing, I Still Have Those Errors


Re: INI_String - MadeMan - 08.09.2011

You are using INI_String in wrong place.


Re: INI_String - AntiGen - 08.09.2011

So What Would You Suggest


Re: INI_String - park4bmx - 08.09.2011

are you suing the INI_String("Admin", Admin1, 4; // 421 ETC.. under a callback ?


Re: INI_String - AntiGen - 08.09.2011

Код:
public OnPlayerConnect(playerid)
{
    new string[256];
 	new targetid;
	new pTargetName[24];
	new pName[MAX_PLAYER_NAME];
	GetPlayerName(playerid,pName,24);
	GetPlayerName(targetid,pTargetName,24);
 	new file2[128],ip[16];
	GetPlayerIp(playerid,ip,16);
	format(file2,sizeof(file2),"User_Database/Logs/Bans/%s.ini",ip);
	if(fexist(file2))
	{
	    new Admin1[48], Reason[128];
                new INI:handler = INI_Open(file2);
		INI_String("Admin", Admin1, 48);
	 	INI_String("Reason", Reason, 128);
		format(string,sizeof(string),""COL_RED"\t\tAccount "COL_YELLOW"\"%s\""COL_RED"Since Your Banned We Would Like You To Read These Following Details!\nYour name: %s \nAdmin name: %s \nReason: %s \nYour IP Address: %s",pTargetName,pName,Admin1,Reason,ip);
		ShowPlayerDialog(playerid,9,DIALOG_STYLE_MSGBOX,""COL_RED"BANNED",string,"OK","");
		INI_Close(handler);
		Kick(playerid);
		return 1;
	}
}
What's Wrong.. As I Said I'm Learning Y_INI


Re: INI_String - Zh3r0 - 08.09.2011

INI_String must be used differently, suggest you to use INI_ParseFile.

Check ******'s tutorial.


Re: INI_String - AntiGen - 08.09.2011

Every Time I Try This I Get Errors.