teleport command; 2 errors
#1

error

Quote:

C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 431) : error 010: invalid function or declaration
C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 434) : error 010: invalid function or declaration
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


2 Errors.

cmd
Quote:

}
if(!strcmp(cmdtext, "/go", true, 3)
{
SetPlayerPos 637.5580 -5340.8470 3.2990 360.0000 0
return 1;
}

Reply
#2

Код:
if(!strcmp(cmdtext, "/go", true, 3)
{
SetPlayerPos(playerid,637.5580, -5340.8470, 3.2990);
return 1;
}
It should work now.
Reply
#3

pawn Код:
if (strcmp("/go", cmdtext, true, 3) == 0)
{
     SetPlayerPos 637.5580 -5340.8470 3.2990 360.0000 0
     return 1;
}
Reply
#4

....
Quote:

C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 429) : warning 217: loose indentation
C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 431) : error 076: syntax error in the expression, or invalid function call
C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 431) : warning 215: expression has no effect
C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 431) : error 001: expected token: ";", but found "-rational value-"
C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 431) : warning 215: expression has no effect
C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 431) : error 001: expected token: ";", but found "-rational value-"
C:\Users\Mijn pc\Desktop\davy's mapke\SERVER\roleplay\Andre's\gamemodes\test1.pwn( 431) : fatal error 107: too many error messages on one line

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


4 Errors.

Reply
#5

When you make your command like that first one, It's like this.

if(!strcmp(cmdtext,"/comand",true)) {
return true;}

No need for a Command size in there.
Reply
#6

Код:
if (strcmp("/go", cmdtext, true, 3) == 0)
{
     SetPlayerPos 637.5580 -5340.8470 3.2990 360.0000 0);
     return 1;
}
their and if you want it to send them a message when they teleport

Код:
if (strcmp("/go", cmdtext, true, 3) == 0)
{
     SetPlayerPos 637.5580 -5340.8470 3.2990 360.0000 0);
     SendClientMessage(playerid,0xFFFFFFFF,"You Teleported To /go!");
     return 1;
}
Reply
#7

I dont get it.
Reply
#8

Quote:
Originally Posted by davelord
Посмотреть сообщение
....
Well, you have messed up the coordines I guess , So you should go in game and save the position that you want.

Then read this it would help you more

https://sampwiki.blast.hk/wiki/SetPlayerPos
Reply
#9

Still got the same errors.
Reply
#10

Can you show us line 431 ?
Reply
#11

try:
pawn Код:
if (strcmp("/go", cmdtext, true) == 0)
{
      SetPlayerPos(637.5580 -5340.8470 3.2990 360.00);
      return 1;
}
my pawno say no errors.

hope i helped!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)