Help give result value*string3 .. pls
#1

I'm trying to make a variable with a value. Calculated string3. More is giving error:

pawn Код:
public SBan(playerid, string[], string2[], string3[])
{
    new arquivo[64], tmp[20], tmp2[20], ip[16];
    GetPlayerIp(playerid, ip, sizeof ip);
    format(arquivo, sizeof(arquivo), "Banidos/%s.ini",PlayerName(playerid));
    getdate(Ano, Mes, Dia);
    format(tmp, 20, "%d/%d/%d", Dia, Mes, Ano);
    gettime(Hora, Minuto, Segundo);
    new tmp3 = gettime();
        new tmp4 = 84400*string3;
    format(tmp2, 20, "%d:%d:%d", Hora, Minuto, Segundo);
    format(gstring, 128, "[%d/%d/%d] [%d:%d:%d] %s IP:%s foi banido pelo admin %s, motivo: %s", v[2], v[1], v[0], v[3], v[4], v[5], PlayerName(playerid),
    ip, string2, string);
    SBanLog(gstring);
    format(Str, 202, "INSERT INTO `banlist`(`IP`, `Name`, `Reason`, `Admin`, `BanDate`, `BanTime`, `BanDays`, `Request`, `Aproove`, `PicLink1`, `PicLink2`, `PicLink3`, `Details`, `Serial`, `TempoBan`, `TempoUnban`,`Nick` ");
    format(Str, 470, ") %s VALUES ('%s','%s','%s','%s','%s','%s','%i','0','0','---','---','---','In-Game','---','%s','%s')", Str, ip, PlayerName(playerid), string, string2, tmp, tmp2, tmp4+getdate(), tmp3, PlayerName(playerid));
    mysql_function_query(Connect, Str, false, "", "");
    SetTimer("kickarr", 500, 0);
 return 1;
}
pawn Код:
new tmp4 = 84400*string3;
Very Thanks

@Edit: Sorry topic name. Confuse me.
And sorry for bad english.
Reply
#2

pawn Код:
new tmp4 = 84400*strval(string3);
But why don't you use it as an integer instead of an array?
Reply
#3

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
But why don't you use it as an integer instead of an array?
how so?

Quote:
Originally Posted by Konstantinos
Посмотреть сообщение
pawn Код:
new tmp4 = 84400*strval(string3);
Is always returning 0 in string3 value. 've used printf to see the value of string3. and is not zero.
More is returning zero.
Reply
#4

PHP код:
string3[] 
to

PHP код:
string3 
Reply
#5

But if i change it.. It appears errors.

Example of function:
pawn Код:
SBan(playerid, "Pego Usando um nome que й proibido no [BVS]", "Automбtico", "9999");
SBan(giveplayerid, "Terceiro aviso", sendername, "3");
etc..
This values are stored on String1, 2, 3..
Reply
#6

Remove the quotations " " in the 4th param

pawn Код:
SBan(playerid, "Pego Usando um nome que й proibido no [BVS]", "Automбtico", 9999);
SBan(giveplayerid, "Terceiro aviso", sendername, 3);
Reply
#7

++REP

Very thanks! to everyone who helped me.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)