09.10.2010, 01:06
Hey guys,
Have a few problems with my register command under OnPlayerCOmmandText
Script:
errors:
C:\Users\Ali\Desktop\SAMP Server\gamemodes\untitled.pwn(255) : warning 217: loose indentation
C:\Users\Ali\Desktop\SAMP Server\gamemodes\untitled.pwn(257) : error 017: undefined symbol "dcmd"
C:\Users\Ali\Desktop\SAMP Server\gamemodes\untitled.pwn(25 : error 017: undefined symbol "dcmd"
C:\Users\Ali\Desktop\SAMP Server\gamemodes\untitled.pwn(261) : error 017: undefined symbol "dcmd_register"
3 Errors.
Any help will be appreciated, thank you S.A.M.P members
Have a few problems with my register command under OnPlayerCOmmandText
Script:
pawn Код:
new params[128]; // Line 256
dcmd(register, 8, cmdtext);
dcmd(login, 5, cmdtext);
{
dcmd_register(playerid, params[])
{
new file[128], pname[MAX_PLAYER_NAME];
GetPlayerName(playerid, pname, sizeof(pname));
format(file, sizeof(file), "\\Users\\%s.ini", pname);
if(!strlen(params)) return SendClientMessage(playerid, COLOR_DORANGE, "[USAGE]: /register [PASSWORD]");
if(dini_Exists(file)) return SendClientMessage(playerid, COLOR_DORANGE, "[SYSTEM]: This account is already registered in our database!");
dini_Create(file);
dini_IntSet(file, "hashPW", udb_hash(params));
dini_Set(file, "password", params);
dini_IntSet(file, "AdminLevel",PlayerInfo[playerid][AdminLevel] = 0);
dini_IntSet(file, "score", PlayerInfo[playerid][score] = 0);
dini_IntSet(file, "money", PlayerInfo[playerid][cash] = 500);
new string[128];
format(string, 128, "[SYSTEM]: You succesfully registered the nickname %s with password %s", pname, params);
SendClientMessage(playerid, COLOR_YELLOW, string);
logged[playerid] = 1;
SendClientMessage(playerid, COLOR_YELLOW, "[SYSTEM]: You have been automatically logged in!");
return 1;
}
}
C:\Users\Ali\Desktop\SAMP Server\gamemodes\untitled.pwn(255) : warning 217: loose indentation
C:\Users\Ali\Desktop\SAMP Server\gamemodes\untitled.pwn(257) : error 017: undefined symbol "dcmd"
C:\Users\Ali\Desktop\SAMP Server\gamemodes\untitled.pwn(25 : error 017: undefined symbol "dcmd"
C:\Users\Ali\Desktop\SAMP Server\gamemodes\untitled.pwn(261) : error 017: undefined symbol "dcmd_register"
3 Errors.
Any help will be appreciated, thank you S.A.M.P members