INI_String
#1

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 -.-
Reply
#2

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
Reply
#3

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)
Reply
#4

That Does Nothing, I Still Have Those Errors
Reply
#5

You are using INI_String in wrong place.
Reply
#6

So What Would You Suggest
Reply
#7

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

Код:
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
Reply
#9

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

Check ******'s tutorial.
Reply
#10

Every Time I Try This I Get Errors.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)