Faster Registration/.ini file creation
#1

Continuing my learning of Pawn, yet again.

I've created a registration for my site, however the ini file creation is very slow.

Код:
		  GetPlayerIp(playerid, ip, sizeof(ip));
		  dini_Create(file);
		  dini_IntSet(file, "AdminLevel",  0);
		  dini_IntSet(file, "Bank",  	 250);
		  dini_IntSet(file, "Cash",  	 500);
		  dini_Set  (file, "IP",  	 	 ip);
		  dini_IntSet(file, "Job",  	 0);
		  dini_IntSet(file, "Level",    0);
		  dini_IntSet(file, "Loan",     0);
		  dini_IntSet(file, "Password",   udb_hash(password));

		  PlayerPlaySound(playerid, 1057, 0.0, 0.0, 0.0);

		  gPlayerLogged[playerid] = 1;
		  SendClientMessage(playerid, COLOR_SUCCESS, "Account created! You have been automatically logged in.");

		  printf("%s registered account.", name);
I'm not sure which bit in specific is slow. But I'm wondering if there's a faster way of setting .ini's than dini?

Also if there's any more tips for improvement on the script, that'd be great.
Reply
#2

Perhaps you could look into DJson.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)