SA-MP Forums Archive
error 001: expected token: "-string end-" - 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 001: expected token: "-string end-" (/showthread.php?tid=589115)



error 001: expected token: "-string end-" - thaKing - 15.09.2015

PHP код:
NO_NO_NO.pwn(407) : error 001expected token"-string end-"but found "-identifier-"
NO_NO_NO.pwn(407) : warning 215expression has no effect
NO_NO_NO
.pwn(407) : error 001expected token";"but found ")"
NO_NO_NO.pwn(407) : error 029invalid expressionassumed zero
NO_NO_NO
.pwn(407) : fatal error 107too many error messages on one line 
PHP код:
AccessDenied(itype=0)
{
    new 
str[128];
    if (
type == 0format(strsizeof(str), "Access denied!");
    else if (
type == 1format(strsizeof(str), "You are not an Admin!");
    else if (
type == 2format(strsizeof(str), "You are not a Game Master!");
    return 
SendServerMessage(istr);// line 407




Re: error 001: expected token: "-string end-" - SpikY_ - 15.09.2015

PHP код:
AccessDenied(itype=0)
{
    new 
str[128];
    if (
type == 0format(strsizeof(str), "Access denied!");
    else if (
type == 1format(strsizeof(str), "You are not an Admin!");
    else if (
type == 2format(strsizeof(str), "You are not a Game Master!");
    return 
SendServerMessagei, -1str );// line 407

try this?


Re: error 001: expected token: "-string end-" - thaKing - 15.09.2015

It's not the thing, because I use Emmet_'s SendClientMessageEx function.

And
PHP код:
#define SendServerMessage(%0,%1) \
    
SendClientMessageEx(%0COLOR_WHITE"[{EEE8AA}server{EEEEEE}] "%1
So, no, that's not the problem.


Re: error 001: expected token: "-string end-" - Bolex_ - 15.09.2015

define color white at the top of script ?


Re: error 001: expected token: "-string end-" - thaKing - 15.09.2015

Quote:
Originally Posted by Scripter18
Посмотреть сообщение
define color white at the top of script ?
Already done, when I started to script my gm.


Re: error 001: expected token: "-string end-" - thaKing - 15.09.2015

Well, I fixed it. Probably just functions was confused together.

If someone wants to know how:

PHP код:
AccessDenied(itype=0)
{
    new 
str[128];
    if (
type == 0format(strsizeof(str), "Access denied!");
    else if (
type == 1format(strsizeof(str), "You are not an Admin!");
    else if (
type == 2format(strsizeof(str), "You are not a Game Master!");
    return 
SendClientMessage(iCOLOR_WHITEstr);