SA-MP Forums Archive
error 010: invalid function or declaration - 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)
+--- Thread: error 010: invalid function or declaration (/showthread.php?tid=647870)



error 010: invalid function or declaration - DJefferson - 12.01.2018

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.497;
SendClientMessage(playerid, 0xFFFFFF,"You got teleported to SF.");
return 1;
}
return 0;
}


whats the problem here?


Re: error 010: invalid function or declaration - jasperschellekens - 12.01.2018

Quote:
Originally Posted by DJefferson
Посмотреть сообщение
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.497;
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: https://sampwiki.blast.hk/wiki/SetPlayerPos

PHP код:
CMD:gotosf(playeridparams[])
{
    
SetPlayerPos(playerid1165.8445,-1255.5028,15.2013);
    
SendClientMessage(playerid0xFFFFFF,"You got teleported to SF.");
    return 
1;