PDA

View Full Version : error 010: invalid function or declaration


DJefferson
12/01/2018, 03:14 PM
C:\Users\LENOVO\Desktop\Trenom\gamemodes\TP.pwn(17 ) : error 010: invalid function or declaration
C:\Users\LENOVO\Desktop\Trenom\gamemodes\TP.pwn(21 ) : error 010: invalid function or declaration
C:\Users\LENOVO\Desktop\Trenom\gamemodes\TP.pwn(23 ) : error 010: invalid function or declaration

if (strcmp("/gotosf", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 1165.8445,-1255.5028,15.2013,197.4978);
SendClientMessage(playerid, 0xFFFFFF,"You got teleported to SF.");
return 1;
}
return 0;
}


whats the problem here?

jasperschellekens
12/01/2018, 03:45 PM
C:\Users\LENOVO\Desktop\Trenom\gamemodes\TP.pwn(17 ) : error 010: invalid function or declaration
C:\Users\LENOVO\Desktop\Trenom\gamemodes\TP.pwn(21 ) : error 010: invalid function or declaration
C:\Users\LENOVO\Desktop\Trenom\gamemodes\TP.pwn(23 ) : error 010: invalid function or declaration

if (strcmp("/gotosf", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 1165.8445,-1255.5028,15.2013,197.4978);
SendClientMessage(playerid, 0xFFFFFF,"You got teleported to SF.");
return 1;
}
return 0;
}


whats the problem here?

for gods sake, use ZCMD... if you don't.. eventually you will convert all your commands and it will be much more work..

Also you need to put your code between code tags.

And i suggest you to read this: http://wiki.sa-mp.com/wiki/SetPlayerPos


CMD:gotosf(playerid, params[])
{
SetPlayerPos(playerid, 1165.8445,-1255.5028,15.2013);
SendClientMessage(playerid, 0xFFFFFF,"You got teleported to SF.");
return 1;
}