SA-MP Forums Archive
Error 010 and 001 (compiling errors) - 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: Error 010 and 001 (compiling errors) (/showthread.php?tid=429677)



Error 010 and 001 (compiling errors) - Red_Dragon. - 10.04.2013

These are the errors
pawn Код:
D:\ZombieMod\gamemodes\zm.pwn(159) : error 001: expected token: "-string end-", but found "-identifier-"
D:\Klodaaa\gamemodes\zm.pwn(164) : error 010: invalid function or declaration
D:\Klodaaa\gamemodes\zm.pwn(171) : error 001: expected token: "-string end-", but found "-identifier-"
D:\Klodaaa\gamemodes\zm.pwn(171) : error 017: undefined symbol "CName"
D:\Klodaaa\gamemodes\zm.pwn(171) : warning 215: expression has no effect
D:\Klodaaa\gamemodes\zm.pwn(171) : error 001: expected token: ";", but found "-identifier-"
D:\Klodaaa\gamemodes\zm.pwn(171) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
and here are the lines
pawn Код:
new randomMessages[][] =
{
    ""chat""COL_LGREEN" Welcome to "Name" "Version" Created by "Creator"", //line 159
pawn Код:
}; //line 164
pawn Код:
main()
{
    print("\n----------------------------------");
    print(""CName" - "Name" "Version" Loaded"); //line 171
    print("----------------------------------\n");
}



Re: Error 010 and 001 (compiling errors) - iJumbo - 10.04.2013

EDIT nevermind wait how you define ?

if you are using

pawn Код:
#define Cname MyGamemodeName
use

pawn Код:
#define Cname "MyGamemodeName"



Re: Error 010 and 001 (compiling errors) - FalconX - 10.04.2013

To do that, you should format the string. And the print thing,

pawn Код:
printf( "%s - %s %s Loaded", CName, Name, Version ); // if version is in numbers use %d instead of %s
make you define all of them: CName, Name and Version at top


Re: Error 010 and 001 (compiling errors) - iJumbo - 10.04.2013

You don't solve the frist code... with my solution you will solve all problems


Re: Error 010 and 001 (compiling errors) - SilverKiller - 10.04.2013

Quote:
Originally Posted by FalconX
Посмотреть сообщение
To do that, you should format the string. And the print thing,

pawn Код:
print( "%s - %s %s Loaded", CName, Name, Version ); // if version is in numbers use %d instead of %s
You should use printf for that.


Re: Error 010 and 001 (compiling errors) - FalconX - 10.04.2013

Quote:
Originally Posted by SilverKiller
Посмотреть сообщение
You should use printf for that.
yes it's printf; it was a typo lol.


Re: Error 010 and 001 (compiling errors) - Red_Dragon. - 10.04.2013

@Jumbo: Neither one works, but thank you

@FalconX: Also doesn't work, but thank you


Re: Error 010 and 001 (compiling errors) - iJumbo - 10.04.2013

So show where you define CName Name and Version i just tried and compiles fine for me


Re: Error 010 and 001 (compiling errors) - Red_Dragon. - 10.04.2013

These errors appear when I add the second code you posted Ijumbo
pawn Код:
D:\ZombieMod\gamemodes\zm.pwn(162) : error 001: expected token: "-string end-", but found "-identifier-"
D:\ZombieMod\gamemodes\zm.pwn(167) : error 010: invalid function or declaration
D:\ZombieMod\gamemodes\zm.pwn(174) : error 001: expected token: "-string end-", but found "-identifier-"
D:\ZombieMod\gamemodes\zm.pwn(174) : error 017: undefined symbol "CName"
D:\ZombieMod\gamemodes\zm.pwn(174) : warning 215: expression has no effect
D:\ZombieMod\gamemodes\zm.pwn(174) : error 001: expected token: ";", but found "-identifier-"
D:\ZombieMod\gamemodes\zm.pwn(174) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


6 Errors.
same lines


Re: Error 010 and 001 (compiling errors) - iJumbo - 10.04.2013

You don't have to add you have to replace! and i ask "So show where you define CName Name"