Help please.
#1

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?!
Reply
#2

Double check your Cordinates for IsPlayerInRangeOfPoint because other than that, it should work just fine...
Reply
#3

Any idea about the warning exception thing?
Reply
#4

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
Reply
#5

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...
Reply
#6

Ah well, just switch them then
Long time ago i used strcmp, so
Reply
#7

Warning S007: Exception 0xC0000005 at 4CA013
Need help with that..
Reply
#8

The co-ordinates are right, can it have something to do with them exiting from an interior? It's still not working..
Reply
#9

Код:
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.
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)