3 errors when compiling
#1

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]"");
Reply
#2

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"");
Reply
#3

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]"");
Reply
#4

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

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.
Reply
#6

You have to fix the text.. that's all
Reply
#7

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
Reply
#8

Ok, fixed, Thank you all +rep 4 all
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)