I Fail
#1

Normally this works fine but when i put it in and compile i get 26 errors. Can someone help?

Код:
if (!strcmp("/Teleports",cmdtext,true))
	SendClientMessage(playerid,COLOR_WHITE,"SF Nrg - /NRG, Base Jump /BJ(1|2|3|4), LS Airport - /LSA, SF Airport - /SFA, LV Airport - /LVA.");
	SendClientMessage(playerid,COLOR_WHITE,"Area 51 Dive - /dive, SF Airport Dive - /SFA, SF Dive - /dive2, Abandoned Airport - /AA.");
	return 1;
{
Reply
#2

Did you remember to put public OnPlayerCommandText in?
Reply
#3

Well i'm making a teleport script and i need it to say all the teleports. It's under "public OnPlayerCommandText"

Код:
public OnPlayerCommandText(playerid, cmdtext[])
if (!strcmp("/Teleports",cmdtext,true))
	SendClientMessage(playerid,COLOR_WHITE,"SF Nrg - /NRG, Base Jump /BJ(1|2|3|4), LS Airport - /LSA, SF Airport - /SFA, LV Airport - /LVA.");
	SendClientMessage(playerid,COLOR_WHITE,"Area 51 Dive - /dive, SF Airport Dive - /SFA, SF Dive - /dive2, Abandoned Airport - /AA.");
	return 1;
{
Reply
#4

need one
{ on the top and on the end its }


pawn Код:
if (!strcmp("/Teleports",cmdtext,true))
{
SendClientMessage(playerid,COLOR_WHITE,"SF Nrg - /NRG, Base Jump /BJ(1|2|3|4), LS Airport - /LSA, SF Airport - /SFA, LV Airport - /LVA.");
    SendClientMessage(playerid,COLOR_WHITE,"Area 51 Dive - /dive, SF Airport Dive - /SFA, SF Dive - /dive2, Abandoned Airport - /AA.");
    return 1;
}
Reply
#5

Thanks A lot, You guys help me so much.
Reply
#6

Ok, I still get 26 errors

But it only happens when i add that command

Код:
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(97) : warning 209: function "OnPlayerCommandText" should return a value
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(97) : error 055: start of function body without function header
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(98) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(101) : error 021: symbol already defined: "SetPlayerInterior"
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(105) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(107) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(110) : error 021: symbol already defined: "SetPlayerInterior"
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(114) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(116) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(119) : error 021: symbol already defined: "SetPlayerInterior"
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(123) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(125) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(128) : error 021: symbol already defined: "SetPlayerInterior"
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(132) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(134) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(137) : error 021: symbol already defined: "SetPlayerInterior"
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(141) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(143) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(146) : error 021: symbol already defined: "SetPlayerInterior"
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(147) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(153) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(159) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(161) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(164) : error 021: symbol already defined: "SetPlayerInterior"
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(169) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(171) : error 010: invalid function or declaration
C:\Users\Scott\Desktop\Ghost Server\filterscripts\NRGtele.pwn(174) : error 021: symbol already defined: "SetPlayerInterior"
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)