Need a Little Help
#1

Okay, i am scripting something similar to SARPS "Points", my /capture works, at least it looks to, it sends the Client Messages. Script:
Код:
	if(strcmp(cmd, "/capture", true) == 0)
	{
	  if(IsPlayerConnected(playerid))
	  {
	    if(PlayerInfo[playerid][pRank] > 4)
	      {
	    		if(PlayerToPoint(30.0,playerid,-1525.5349,2635.0120,55.8359))
						{
						currentpoint = 1;
						curfamily = PlayerInfo[playerid][pFMember];
						pointcappers = FamilyInfo[curfamily][FamilyName];
						SendClientMessageToAll(COLOR_LIGHTRED, "The Point Is Being Captured");
						SendClientMessage(playerid, COLOR_WHITE, "You are attempting to cap the point.");
						SetTimer("CapTimer",1,false);
						return 1;
						}
				}
			}
		}
However, the CapTimer never goes off, it never sends the client message and it doesnt update the Scriptfile.

And yes, i realize it is set to one milisecond, it was set to a minute, bu tthat didnt work either.

If you could help that would be great


Код:
public CapTimer()
{
PointInfo[currentpoint][PointHours] = PointInfo[currentpoint][ResetHours];
PointInfo[currentpoint][OwndFamilyName] = pointcappers;
SendClientMessageToAll(COLOR_LIGHTRED, "The Point Has Been Captured");
SavePoints();
}
EDIT: And no, there is no errors upon compile.
Reply
#2

No warnings or anything?
Reply
#3

CapTimer is forwarded?
Reply
#4

Yea its forwarded, and there is no errors or warnings upon compiling.
Reply
#5

Quote:
Originally Posted by Trill
Yea its forwarded, and there is no errors or warnings upon compiling.
you could try to return 1; CapTimer yes?

Reply
#6

It's best if you add debug messages to see where the problem appears.
Reply
#7

i was thinking the same thing, i do the same shit with PHP, the MySQL error messages.

How do we do the same thing in PAWN?
Reply
#8

Quote:
Originally Posted by Trill
i was thinking the same thing, i do the same shit with PHP, the MySQL error messages.

How do we do the same thing in PAWN?
pawn Код:
printf("DEBUG: debugText.");
Reply
#9

so i just put that in that Public CapTimer shit?
Reply
#10

Quote:
Originally Posted by Trill
so i just put that in that Public CapTimer shit?
Just put it after every line so you'll see where the problem appears.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)