Help please. - 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: Help please. (
/showthread.php?tid=275868)
Help please. -
Rabbayazza - 11.08.2011
Sorry for the large amount of topics, but I need help.
Firstly.
S007: Exception 0xC0000005 at 4CA013
What is that? How do I get rid of it? It happens when I spawn at a specific place, but doesn't crash me.
and
Код:
if (strcmp(cmdtext, "/exit", true) == 0)
{
if(IsPlayerInRangeOfPoint(playerid, 10, 288.745971,169.350997,1007.171875))
{
SetPlayerPos(playerid, 290.7193,-1618.0544,33.1547);
SetPlayerInterior(playerid, 0);
}
return 1;
}
Why wont this /exit command work?!
Re: Help please. -
XGh0stz - 11.08.2011
Double check your Cordinates for IsPlayerInRangeOfPoint because other than that, it should work just fine...
Re: Help please. -
Rabbayazza - 11.08.2011
Any idea about the warning exception thing?
Re: Help please. -
Wesley221 - 11.08.2011
Im not sure about this, but try to give your strcmp line a specific lenght.
pawn Код:
if (strcmp(cmdtext, "/exit", 5, true) == 0)
Note: i can be wrong with this, just give it a try
Re: Help please. -
XGh0stz - 11.08.2011
Quote:
Originally Posted by Wesley221
Im not sure about this, but try to give your strcmp line a specific lenght.
pawn Код:
if (strcmp(cmdtext, "/exit", 5, true) == 0)
Note: i can be wrong with this, just give it a try
|
The string length argument would come after true/false, not before
Anyway, all that would do is just check the first 5 characters (/exit)
It would solve the issue if someone typed in: /exit building
But thats about it...
Re: Help please. -
Wesley221 - 11.08.2011
Ah well, just switch them then
Long time ago i used strcmp, so
Re: Help please. -
Rabbayazza - 11.08.2011
Warning S007: Exception 0xC0000005 at 4CA013
Need help with that..
Re: Help please. -
Rabbayazza - 11.08.2011
The co-ordinates are right, can it have something to do with them exiting from an interior? It's still not working..
Re: Help please. -
XGh0stz - 11.08.2011
Код:
if (strcmp(cmdtext, "/exit", true) == 0)
{
print("/exit command activated!");
if(IsPlayerInRangeOfPoint(playerid, 10, 288.745971,169.350997,1007.171875))
{
print("Teleporting...!");
SetPlayerPos(playerid, 290.7193,-1618.0544,33.1547);
SetPlayerInterior(playerid, 0);
}
return 1;
}
Use this, then see what print messages you get... This helps determine how far your command goes etc.
Re: Help please. -
Rabbayazza - 11.08.2011
Using zcmd now..
Код:
COMMAND:exit(playerid,params[])
{
print("/exit command activated!");
if(IsPlayerInRangeOfPoint(playerid, 2.0, 246.2732, 112.0255, 1003.2188))
{
print("Teleporting...");
SetPlayerPos(playerid, 290.7193, -1618.0544, 33.1547);
SetPlayerInterior(playerid, 0);
}
return 1;
}
Didn't get any messages.