strval returning 0 :(
#1

pawn Code:
if(dialogid == 5)
    {
      GetPlayerPos(ClickedPlayer[playerid], x[playerid], y[playerid], z[playerid]);
        Cage0[playerid] = CreateObject(985, x[playerid], y[playerid]+4, z[playerid], 0.0, 0.0, 0.0);
    Cage1[playerid] = CreateObject(985, x[playerid]+4, y[playerid], z[playerid], 0.0, 0.0, 90.0);
    Cage2[playerid] = CreateObject(985, x[playerid]-4, y[playerid], z[playerid], 0.0, 0.0, 270.0);
    Cage3[playerid] = CreateObject(985, x[playerid], y[playerid]-4, z[playerid], 0.0, 0.0, 180.0);
    Caged[playerid] = 1;
    new time = strval(inputtext);
    SetTimerEx("Uncage", false, 60000*time, "i", playerid);
    TogglePlayerControllable(playerid, 1);
        new string[128];
        format(string, sizeof(string), "Administrator %s has caged %s for %d minutes.", adminname, name, time);
        return 1;
    }
That's under OnDialogResponse, and it seems strval instantly returns 0 no matter what I put in. Why?
Reply
#2

print out what you're putting in
Reply
#3

I think you got your parameters backwards...
pawn Code:
SetTimerEx("Uncage", false, 60000*time, "i", playerid);
pawn Code:
SetTimerEx("Uncage", 60000*time, false, "i", playerid);
Reply
#4

Indeed I did >.<

Your sig is very appropriate at this point, lol. Thanks
Reply


Forum Jump:


Users browsing this thread: