SA-MP Forums Archive
whats wrong? - 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: whats wrong? (/showthread.php?tid=92178)



whats wrong? - Eazy_E214 - 18.08.2009

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/stunt1", cmdtext, true, 10) == 0)
	{
		SetPlayerPos(playerid, 827.0233,-1847.0721,12.7766);
		SetPlayerInterior(playerid, 0);
		SendClientMessage(playerid, 0xFFFF00AA, "_BIG BUDDAH STUNT_");
		return 1;
	if (strcmp("/stunt2", cmdtext, true, 10) == 0)
	{
		SetPlayerPos(playerid, 2525.5281,-1663.4618,18.9872);
		SetPlayerInterior(playerid, 0);
		SendClientMessage(playerid, 0xFFFF00AA, "_GROVESTREET STUNT_");
		return 1;
	}
	return 0;
}



Re: whats wrong? - XCultz - 18.08.2009

Good luck!


Re: whats wrong? - pliva_sb - 18.08.2009

Quote:
Originally Posted by Eazy_E214
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/stunt1", cmdtext, true, 10) == 0)
	{
		SetPlayerPos(playerid, 827.0233,-1847.0721,12.7766);
		SetPlayerInterior(playerid, 0);
		SendClientMessage(playerid, 0xFFFF00AA, "_BIG BUDDAH STUNT_");
		return 1;
	if (strcmp("/stunt2", cmdtext, true, 10) == 0)
	{
		SetPlayerPos(playerid, 2525.5281,-1663.4618,18.9872);
		SetPlayerInterior(playerid, 0);
		SendClientMessage(playerid, 0xFFFF00AA, "_GROVESTREET STUNT_");
		return 1;
	}
	return 0;
}
What is the problem?


Re: whats wrong? - CAR - 18.08.2009

Here it is!

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     new cmd, idx;
     cmd = strtok(cmdtext, idx);
	if(strcmp(cmd, "/stunt1", true) == 0)
	{
		SetPlayerPos(playerid, 827.0233,-1847.0721,12.7766);
		SetPlayerInterior(playerid, 0);
		SendClientMessage(playerid, 0xFFFF00AA, "_BIG BUDDAH STUNT_");
		return 1;
     }
	if(strcmp(cmd, "/stunt2", true) == 0)
	{
		SetPlayerPos(playerid, 2525.5281,-1663.4618,18.9872);
		SetPlayerInterior(playerid, 0);
		SendClientMessage(playerid, 0xFFFF00AA, "_GROVESTREET STUNT_");
		return 1;
	}
	return 0;
}



Re: whats wrong? - Eazy_E214 - 18.08.2009

Quote:
Originally Posted by pliva_sb
Quote:
Originally Posted by Eazy_E214
Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
	if (strcmp("/stunt1", cmdtext, true, 10) == 0)
	{
		SetPlayerPos(playerid, 827.0233,-1847.0721,12.7766);
		SetPlayerInterior(playerid, 0);
		SendClientMessage(playerid, 0xFFFF00AA, "_BIG BUDDAH STUNT_");
		return 1;
	if (strcmp("/stunt2", cmdtext, true, 10) == 0)
	{
		SetPlayerPos(playerid, 2525.5281,-1663.4618,18.9872);
		SetPlayerInterior(playerid, 0);
		SendClientMessage(playerid, 0xFFFF00AA, "_GROVESTREET STUNT_");
		return 1;
	}
	return 0;
}
What is the problem?
Код:
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(92) : warning 225: unreachable code
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(92) : warning 217: loose indentation
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(102) : warning 217: loose indentation
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(102) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(102) : error 004: function "OnPlayerInfoChange" is not implemented
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(107) : warning 225: unreachable code
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(107) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(107) : error 004: function "OnPlayerEnterVehicle" is not implemented
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(112) : warning 225: unreachable code
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(112) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(112) : error 004: function "OnPlayerExitVehicle" is not implemented
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(117) : warning 225: unreachable code
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(117) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(117) : error 004: function "OnPlayerStateChange" is not implemented
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(122) : warning 225: unreachable code
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(122) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(122) : error 004: function "OnPlayerEnterCheckpoint" is not implemented
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(127) : warning 225: unreachable code
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(127) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(127) : error 004: function "OnPlayerLeaveCheckpoint" is not implemented
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(132) : warning 225: unreachable code
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(132) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(132) : error 004: function "OnPlayerEnterRaceCheckpoint" is not implemented
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(137) : warning 225: unreachable code
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(137) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(137) : error 004: function "OnPlayerLeaveRaceCheckpoint" is not implemented
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(142) : warning 225: unreachable code
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(142) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(142) : error 004: function "OnRconCommand" is not implemented
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(147) : warning 225: unreachable code
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(147) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(147) : error 004: function "OnObjectMoved" is not implemented
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(152) : warning 225: unreachable code
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(152) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(152) : error 004: function "OnPlayerObjectMoved" is not implemented
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(157) : warning 225: unreachable code
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(157) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(157) : error 004: function "OnPlayerPickUpPickup" is not implemented
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(162) : warning 225: unreachable code
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(162) : error 029: invalid expression, assumed zero
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\teleport.pwn(162) : error 004: function "OnPlayerSelectedMenuRow" is not implemented

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


26 Errors.



Re: whats wrong? - Eazy_E214 - 18.08.2009

Quote:
Originally Posted by CAR
Here it is!

Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
     new cmd, idx;
     cmd = strtok(cmdtext, idx);
	if(strcmp(cmd, "/stunt1", true) == 0)
	{
		SetPlayerPos(playerid, 827.0233,-1847.0721,12.7766);
		SetPlayerInterior(playerid, 0);
		SendClientMessage(playerid, 0xFFFF00AA, "_BIG BUDDAH STUNT_");
		return 1;
    }
	if(strcmp(cmd, "/stunt2", true) == 0)
	{
		SetPlayerPos(playerid, 2525.5281,-1663.4618,18.9872);
		SetPlayerInterior(playerid, 0);
		SendClientMessage(playerid, 0xFFFF00AA, "_GROVESTREET STUNT_");
		return 1;
	}
	return 0;
}
Код:
C:\Dokumente und Einstellungen\Igor\Desktop\samp server\filterscripts\tele.pwn(102) : error 017: undefined symbol "strtok"
C:\Dokumente und Einstellungen\Igor\Desktop\samp server\filterscripts\tele.pwn(103) : error 035: argument type mismatch (argument 1)
C:\Dokumente und Einstellungen\Igor\Desktop\samp server\filterscripts\tele.pwn(110) : error 035: argument type mismatch (argument 1)
C:\Dokumente und Einstellungen\Igor\Desktop\samp server\filterscripts\tele.pwn(101) : warning 203: symbol is never used: "idx"
C:\Dokumente und Einstellungen\Igor\Desktop\samp server\filterscripts\tele.pwn(102) : warning 204: symbol is assigned a value that is never used: "cmd"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.



Re: whats wrong? - CAR - 18.08.2009

above the script

#include <dudb>


Re: whats wrong? - Eazy_E214 - 18.08.2009

Quote:
Originally Posted by CAR
above the script

#include <dudb>
Код:
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\tele.pwn(102) : error 006: must be assigned to an array
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\tele.pwn(103) : error 035: argument type mismatch (argument 1)
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\tele.pwn(110) : error 035: argument type mismatch (argument 1)
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\tele.pwn(102) : warning 204: symbol is assigned a value that is never used: "cmd"
C:\DOKUME~1\Igor\Desktop\SAMPSE~1\FILTER~1\tele.pwn(190) : warning 203: symbol is never used: "ret_memcpy"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.



Re: whats wrong? - snoob - 18.08.2009

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if (strcmp("/stunt1", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, 827.0233,-1847.0721,12.7766);
        SetPlayerInterior(playerid, 0);
        SendClientMessage(playerid, 0xFFFF00AA, "_BIG BUDDAH STUNT_");
        return 1;
    }
    if (strcmp("/stunt2", cmdtext, true, 10) == 0)
    {
        SetPlayerPos(playerid, 2525.5281,-1663.4618,18.9872);
        SetPlayerInterior(playerid, 0);
        SendClientMessage(playerid, 0xFFFF00AA, "_GROVESTREET STUNT_");
        return 1;
    }
    return 0;
}
paste this in your original code ...


Re: whats wrong? - CAR - 19.08.2009



Код:
#include <a_samp>
#include <dudb>

//OnGameModeInit etc.

public OnPlayerCommandText(playerid, cmdtext[])
{
new cmd, idx;
cmd = strtok(cmdtext, idx);
if(strcmp(cmd, "/stunt1", true) == 0)
{
SetPlayerPos(playerid, 827.0233,-1847.0721,12.7766);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, 0xFFFF00AA, "_BIG BUDDAH STUNT_");
return 1;
}
if(strcmp(cmd, "/stunt2", true) == 0)
{
SetPlayerPos(playerid, 2525.5281,-1663.4618,18.9872);
SetPlayerInterior(playerid, 0);
SendClientMessage(playerid, 0xFFFF00AA, "_GROVESTREET STUNT_");
return 1;
}
return 0;
}
It must be good...