Can someone tell me what is this?????
#1

hi.... i have just comipiled this lines

Quote:

if(strcmp(cmd, "/registrar", true) == 0)
{
new dinero =GetPlayerMoney(playerid);
new posicionx[256];
new posiciony[256];
new posicionz[256];
new Float:X,Float:Y,Float:Z;
GetPlayerPos(playerid,X,Y,Z);
format(posicionx,sizeof(posicionx),"%x",X);
format(posiciony,sizeof(posiciony),"%y",Y);
format(posicionz,sizeof(posicionz),"%z",Z);

tmp = strtok(cmdtext, idx);
GetPlayerName(playerid, playername, sizeof(playername));
if(20 < strlen(tmp) || strlen(tmp) < 4)
{
SendClientMessage(playerid, COLOR_DBLUE, "Error! El pass tiene que tener mas de 4 letras y menos de 20!");
return 1;
}
if(!strlen(tmp))
SendClientMessage(playerid, COLOR_DBLUE, "Uso: /registrar [password] ~ Te registrara en el server!");

else
{
if (!dini_Exists(udb_encode(playername)))
{
dini_Create(udb_encode(playername));
dini_IntSet(udb_encode(playername), "password", udb_hash(tmp));
dini_Set(udb_encode(playername),"pass",tmp);
dini_IntSet(udb_encode(playername), "level", 0);
dini_IntSet(udb_encode(playername), "money", dinero);
dini_Set(udb_encode(playername), "posx", posicionx);
dini_Set(udb_encode(playername), "posy", posiciony);
dini_Set(udb_encode(playername), "posz", posicionz);

format(string, sizeof(string), "%s(%i) registrado con el password \"%s\"", playername, playerid, tmp);
printf(string);
format(string, sizeof(string), "Cuenta creada %s con el password \"%s\". por favor NO OLVIDES tu password!", playername, tmp);
SendClientMessage(playerid, COLOR_PURPLE, string);
SendClientMessage(playerid, COLOR_PURPLE, "Logueado!");
logged[playerid] = 1;
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}
else
{
SendClientMessage(playerid, COLOR_RED, "Hubo un error al tratar de registrarte en el server!");
format(string, sizeof(string), "El nick %s ya esta registrado en el server, usa otro!", playername,tmp);
SendClientMessage(playerid, COLOR_RED, string);
}
}

return 1;
}

and when i compile this... it' gets this WEIRD thing

Quote:

C:\DOCUME~1\ALLUSE~1\DOCUME~1\SAMULT~1\SANAND~1\FI LTER~1\Aadmin.pwn(1516) : warning 203: symbol is never used: "level"
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase

Header size: 1384 bytes
Code size: 57496 bytes
Data size: 32700 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4435 cells (17740 bytes)
Total requirements: 107964 bytes

1 Warning.
And then nothing works.... can someone tell me what's this, pleas?
Reply
#2

Lol? Remove the "New level;" part wherever it is in your script?
Reply
#3

Sorry, in the hurry i didn's explain myself well.... the problem is not the LEVEL.... the problem appears when I add

Quote:

new posicionx[256];
new posiciony[256];
new posicionz[256];
-----
format(posicionx,sizeof(posicionx),"%x",X);
format(posiciony,sizeof(posiciony),"%y",Y);
ormat(posicionz,sizeof(posicionz),"%z",Z);
-----
dini_Set(udb_encode(playername), "posx", posicionx);
dini_Set(udb_encode(playername), "posy", posiciony);
dini_Set(udb_encode(playername), "posz", posicionz);

when I insert those lines is when appears this
Quote:

Header size: 1384 bytes
Code size: 57496 bytes
Data size: 32700 bytes
Stack/heap size: 16384 bytes; estimated max. usage=4435 cells (17740 bytes)
Total requirements: 107964 bytes

tha causes my server to crash...
Reply
#4

thats only some info about too many cells/bytes being used and I dont think that that will cause your server to crash
Reply
#5

yes, but only when i add those lines i show you is when appears that INFO, and then the server crashes...

If i remove those lines, that INFO stops appearing and the server works fine
Reply
#6

Use "GetPlayerPos", instead of "format"...
Reply
#7

I don't understand....
Reply
#8

Quote:
Originally Posted by luigifan9
I don't understand....
Then check the date of the last post in the topic before you post next time and you'll understand..
Reply
#9

Quote:
Originally Posted by luigifan9
I don't understand....
OMG, you LIKE, really bumped a super old topic -.-'
this guy probably solved this years ago
Reply
#10

Quote:
Originally Posted by luigifan9
I don't understand....
Stop posting shits, this isn't the first time, when you don't check the date, neither the main topic.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)