strval returning 0 :( - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: strval returning 0 :( (
/showthread.php?tid=140281)
strval returning 0 :( -
biltong - 08.04.2010
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?
Re: strval returning 0 :( -
dice7 - 08.04.2010
print out what you're putting in
Re: strval returning 0 :( -
Joe Staff - 08.04.2010
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);
Re: strval returning 0 :( -
biltong - 08.04.2010
Indeed I did >.<
Your sig is very appropriate at this point, lol. Thanks