Strtok 1 error...
#8

Did you try this?
Код:
if(strcmp(cmd,"/register",true) == 0)
{
  new tmp[128],string[256],pName[MAX_PLAYER_NAME];
  GetPlayerName(playerid,pName,sizeof(pName));
  format(string,sizeof(string),"/EQRP/Players/%s.ini",pName);
  tmp = strtok(cmdtext, idx);
new password = strval(tmp);
  if(PlayerInfo[playerid][pRegged] == 1) return SendClientMessage(playerid,COLOR_DARKRED,"Already Registered");
  if(strlen(tmp) == 0) return SendClientMessage(playerid,COLOR_DARKRED,"USAGE: /register [password]");
PlayerInfo[playerid][pRegged] = 1;
dini_Create(string);
dini_Set(string,"Password",password); // line 867
dini_IntSet(string,"Money",20000);
dini_IntSet(string,"Bank",50000);
dini_IntSet(string,"DriverLic",0);
dini_IntSet(string,"WeaponLic",0);
SetPlayerSkin(playerid,188);
SpawnPlayer(playerid);
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Succesfully Registered, now login: /login [password]");
return 1;
}
Reply


Messages In This Thread
Strtok 1 error... - by introzen - 28.02.2009, 09:41
Re: Strtok 1 error... - by RyDeR` - 28.02.2009, 10:39
Re: Strtok 1 error... - by introzen - 28.02.2009, 10:40
Re: Strtok 1 error... - by RyDeR` - 28.02.2009, 10:43
Re: Strtok 1 error... - by RyDeR` - 28.02.2009, 10:44
Re: Strtok 1 error... - by MenaceX^ - 28.02.2009, 10:44
Re: Strtok 1 error... - by introzen - 28.02.2009, 10:46
Re: Strtok 1 error... - by RyDeR` - 28.02.2009, 10:47
Re: Strtok 1 error... - by introzen - 28.02.2009, 10:48
Re: Strtok 1 error... - by introzen - 28.02.2009, 10:49

Forum Jump:


Users browsing this thread: 1 Guest(s)