errors!! - 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: errors!! (
/showthread.php?tid=125119)
errors!! -
legodude - 02.02.2010
solved
Re: errors!! -
m0niSx - 02.02.2010
try this
pawn Код:
new Float:X;
new Float:Y;
new Float:Z;
GetPlayerPos(playerid, X, Y, Z);
new mine = CreateObject(1213, X, Y, Z, 0, 0, 96);
if (strcmp("/mine", cmdtext, true, 10) == 0)
{
CreateObject(mine, X, Y, Z, 0, 0, 96);
return 1;
}
new Float:mineactiveX;
new Float:mineactiveY;
new Float:mineactiveZ;
GetObjectPos(mine, mineactiveX, mineactiveY, mineactiveZ);
new mineactive = CreateObject(mine, mineactiveX, mineactiveY, mineactiveZ, 0, 0, 96);
if (strcmp("/mineactivate", cmdtext, true, 10) == 0)
{
CreateObject(mineactive, mineactiveX, mineactiveY, mineactiveZ, 0, 0, 96);
return 1;
}
return 0;
Re: errors!! -
legodude - 02.02.2010
i got no errors anymore!!
the compiler library crashed XD
Re: errors!! -
legodude - 02.02.2010
got it
forgot the opening and closing {}
Re: errors!! -
legodude - 02.02.2010
now this
i have the script now like this:
Код:
{
new Float:X;
new Float:Y;
new Float:Z;
GetPlayerPos(playerid, X, Y, Z);
new mine = CreateObject(1213, X, Y, Z, 0, 0, 96);
if (strcmp("/mine", cmdtext, true, 10) == 0)
{
CreateObject(mine, X, Y, Z, 0, 0, 96);
return 1;
}
new Float:mineactiveX;
new Float:mineactiveY;
new Float:mineactiveZ;
GetObjectPos(mine, mineactiveX, mineactiveY, mineactiveZ);
new mineactive = CreateObject(mine, mineactiveX, mineactiveY, mineactiveZ, 0, 0, 96);
if (strcmp("/mineactivate", cmdtext, true, 10) == 0)
{
CreateObject(mineactive, mineactiveX, mineactiveY, mineactiveZ, 0, 0, 96);
{
if(IsPlayerInRangeOfPoint(playerid, 1.0, mineactiveX, mineactiveY, mineactiveZ))
CreateExplosion(mineactiveX, mineactiveY, mineactiveZ, 4, 10.0);
}
return 1;
}
return 0;
}
but when i do /mineactivate it explodes me!!
how to solve that??