SA-MP Forums Archive
Invalid function - 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: Invalid function (/showthread.php?tid=526755)



Invalid function - killing - 19.07.2014

Код:
D:\FiFa 2010\gamemodes\NVCNR.pwn(1501) : error 010: invalid function or declaration
D:\FiFa 2010\gamemodes\NVCNR.pwn(1515) : error 010: invalid function or declaration
D:\FiFa 2010\gamemodes\NVCNR.pwn(28813) : warning 203: symbol is never used: "randomMessages"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: Invalid function - rockhopper - 19.07.2014

Show us your code man we are not gods to get your code in our minds!


Re: Invalid function - killing - 19.07.2014

Код:
new randomMessages[][] =
{
  	"COL_BLUE" ;[Info] "COL_WHITE"Earn Score , Case by robbing stores , buying lotto!",
  	"COL_BLUE" ;[Help] "COL_WHITE"Are you lost are you new? try out the command '/command' and /newbie",
  	"COL_BLUE" ;[Help] "COL_WHITE"Got Stucked? Cant move a single cm? try out /unstuck",
  	"COL_BLUE" ;[NEWS] "COL_GREEN"Consider Donating Us !",
  	"COL_RED" ;[Note] "COL_WHITE"Remember to report hackers and rule breakers with /report <id> <reason>",
  	"COL_BLUE" ;[Help] "COL_WHITE"Remember to read the rules to prevent you from getting banned /rules",
	"COL_BLUE" ;[Info] "COL_WHITE"Remember to use /savestats command to save your stats to avoid losing stats",
	"COL_BLUE" ;[Help] "COL_WHITE"Donate us to get instant features",
	"COL_BLUE" ;[Wass up] "COL_ORANGE"Server Scripted by $p3@R",
	"COL_BLUE" ;[Help] "COL_WHITE"Our Forum is located at "COL_BLUE" www.paklitegaming.net",
	"COL_RED" ;[Note] "COL_WHITE"Remember this is not a Death Match Server!",
	"COL_RED" ;[Note] "COL_WHITE"Report hackers and rule breakers with /report <id> <reason> , DO NOT SAY IT IN MAIN CHAT",
	"COL_BLUE" ;[NEWS] "COL_WHITE"Feel free to suggest anything on our forum "COL_RED" www.paklitegaming.net",
	"COL_BLUE" ;[Info] "COL_WHITE"Always respect other players if you want to be hero in front of them",
};



Re: Invalid function - Scottas - 19.07.2014

pawn Код:
new randomMessages[][] =
{
    COL_BLUE" ;[Info] "COL_WHITE"Earn Score , Case by robbing stores , buying lotto!",
    COL_BLUE" ;[Help] "COL_WHITE"Are you lost are you new? try out the command '/command' and /newbie",
    COL_BLUE" ;[Help] "COL_WHITE"Got Stucked? Cant move a single cm? try out /unstuck",
    COL_BLUE" ;[NEWS] "COL_GREEN"Consider Donating Us !",
    COL_RED" ;[Note] "COL_WHITE"Remember to report hackers and rule breakers with /report <id> <reason>",
    COL_BLUE" ;[Help] "COL_WHITE"Remember to read the rules to prevent you from getting banned /rules",
    COL_BLUE" ;[Info] "COL_WHITE"Remember to use /savestats command to save your stats to avoid losing stats",
    COL_BLUE" ;[Help] "COL_WHITE"Donate us to get instant features",
    COL_BLUE" ;[Wass up] "COL_ORANGE"Server Scripted by $p3@R",
    COL_BLUE" ;[Help] "COL_WHITE"Our Forum is located at "COL_BLUE" www.paklitegaming.net",
    COL_RED" ;[Note] "COL_WHITE"Remember this is not a Death Match Server!",
    COL_RED" ;[Note] "COL_WHITE"Report hackers and rule breakers with /report <id> <reason> , DO NOT SAY IT IN MAIN CHAT",
    COL_BLUE" ;[NEWS] "COL_WHITE"Feel free to suggest anything on our forum "COL_RED" www.paklitegaming.net",
    COL_BLUE" ;[Info] "COL_WHITE"Always respect other players if you want to be hero in front of them",
};
But only if your colors defined like:
pawn Код:
#DEFINE COL_BLUE "{0000FF}"



Re: Invalid function - killing - 19.07.2014

Код:
D:\FiFa 2010\gamemodes\NVCNR.pwn(1501) : error 001: expected token: ";", but found "-string-"
D:\FiFa 2010\gamemodes\NVCNR.pwn(1515) : error 010: invalid function or declaration
D:\FiFa 2010\gamemodes\NVCNR.pwn(28819) : warning 203: symbol is never used: "randomMessages"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.



Re: Invalid function - Scottas - 19.07.2014

can you show color defines?


Re: Invalid function - rockhopper - 19.07.2014

Try this to all
""COL_BLUE" ;[Info] "COL_WHITE"Earn Score , Case by robbing stores , buying lotto!",


Re: Invalid function - Konstantinos - 19.07.2014

The semicolons you placed there are invalid.

pawn Код:
new randomMessages[][] =
{
    ""COL_BLUE" [Info] "COL_WHITE"Earn Score , Case by robbing stores , buying lotto!",
    ""COL_BLUE" [Help] "COL_WHITE"Are you lost are you new? try out the command '/command' and /newbie",
    ""COL_BLUE" [Help] "COL_WHITE"Got Stucked? Cant move a single cm? try out /unstuck",
    ""COL_BLUE" [NEWS] "COL_GREEN"Consider Donating Us !",
    ""COL_RED" [Note] "COL_WHITE"Remember to report hackers and rule breakers with /report <id> <reason>",
    ""COL_BLUE" [Help] "COL_WHITE"Remember to read the rules to prevent you from getting banned /rules",
    ""COL_BLUE" [Info] "COL_WHITE"Remember to use /savestats command to save your stats to avoid losing stats",
    ""COL_BLUE" [Help] "COL_WHITE"Donate us to get instant features",
    ""COL_BLUE" [Wass up] "COL_ORANGE"Server Scripted by $p3@R",
    ""COL_BLUE" [Help] "COL_WHITE"Our Forum is located at "COL_BLUE" www.paklitegaming.net",
    ""COL_RED" [Note] "COL_WHITE"Remember this is not a Death Match Server!",
    ""COL_RED" [Note] "COL_WHITE"Report hackers and rule breakers with /report <id> <reason> , DO NOT SAY IT IN MAIN CHAT",
    ""COL_BLUE" [NEWS] "COL_WHITE"Feel free to suggest anything on our forum "COL_RED" www.paklitegaming.net",
    ""COL_BLUE" [Info] "COL_WHITE"Always respect other players if you want to be hero in front of them"
};
and for it to work, colours should be defined as strings and not integers.