SA-MP Forums Archive
3 errors when compiling - 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: 3 errors when compiling (/showthread.php?tid=472598)



3 errors when compiling - jremi - 29.10.2013

C:\Users\Jake\Desktop\LSCRP\Unedited ARP\gamemodes\modernliferp.pwn.pwn(5569) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Jake\Desktop\LSCRP\Unedited ARP\gamemodes\modernliferp.pwn.pwn(5569) : error 017: undefined symbol "American"
C:\Users\Jake\Desktop\LSCRP\Unedited ARP\gamemodes\modernliferp.pwn.pwn(5569) : error 017: undefined symbol "Roleplay"
C:\Users\Jake\Desktop\LSCRP\Unedited ARP\gamemodes\modernliferp.pwn.pwn(5569) : fatal error 107: too many error messages on one line

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



How to fix? This is the line that all the errors are on:
pawn Код:
SendRconCommand("hostname "American Roleplay [ENG]"");



Re: 3 errors when compiling - Patrick - 29.10.2013

You should have a definition that looks like this

pawn Код:
//Definition underneath Includes
#define SERVER_NAME "American Roleplay [ENG]"
//Under main() or OnGameModeInit
SendRconCommand("hostname "SERVER_NAME"");



Re: 3 errors when compiling - SAMProductions - 29.10.2013

You must put it in OnGameModeInit.

Like for example:

pawn Код:
public OnGameModeInit()
{
    SendRconCommand("hostname American Roleplay [ENG]");
}
and it must be like this:

pawn Код:
SendRconCommand("hostname American Roleplay [ENG]");
not:

pawn Код:
SendRconCommand("hostname "American Roleplay [ENG]"");



Re: 3 errors when compiling - Josh Greening - 30.10.2013

My browser froze and double posted, my apologies. Trying to find how to delete this >.>


Re: 3 errors when compiling - Josh Greening - 30.10.2013

The above replies should have fixed the defines, but the "error 001: expected token: "-string end-", but found "-identifier-" issue is usually caused by a string(Which for some reason the compiler doesn't recognize) such as:
string = (blah == blah) ? "blahblah" : "blahblahblah";

Simply enclose the quotes with brackets to make it look like and the compiler should recognize a proper string end:
string = (blah == blah) ? ("blahblah") : ("blah");

And it should compile properly

EDIT: Ignore this. I missed the bottom part of your post and noticed this isn't the issue you're having. My bad.


Re: 3 errors when compiling - JayZ243 - 30.10.2013

You have to fix the text.. that's all


Re: 3 errors when compiling - RayDcosta - 30.10.2013

simple.
1) you made a mistake in formatting the string. redo it.
2) and 3) those two words passed as variables instead of words. use the " quotes correctly or just define it like someone said above


Re: 3 errors when compiling - jremi - 30.10.2013

Ok, fixed, Thank you all +rep 4 all