PDA

View Full Version : 3 errors when compiling


jremi
29/10/2013, 02:30 PM
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 (c) 1997-2006, ITB CompuPhase



How to fix? This is the line that all the errors are on:

SendRconCommand("hostname "American Roleplay [ENG]"");

Patrick
29/10/2013, 02:32 PM
You should have a definition that looks like this


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

SAMProductions
29/10/2013, 02:41 PM
You must put it in OnGameModeInit.

Like for example:

public OnGameModeInit()
{
SendRconCommand("hostname American Roleplay [ENG]");
}

and it must be like this:

SendRconCommand("hostname American Roleplay [ENG]");

not:

SendRconCommand("hostname "American Roleplay [ENG]"");

Josh Greening
30/10/2013, 02:18 AM
My browser froze and double posted, my apologies. Trying to find how to delete this >.>

Josh Greening
30/10/2013, 02:36 AM
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.

JayZ243
30/10/2013, 10:18 AM
You have to fix the text.. that's all

RayDcosta
30/10/2013, 10:32 AM
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

jremi
30/10/2013, 10:54 AM
Ok, fixed, Thank you all +rep 4 all :)