SA-MP Forums Archive
Problem, please? - 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: Problem, please? (/showthread.php?tid=397005)



Problem, please? - Lonney - 02.12.2012

I got an error. Take it look ( sorry for my english ).

Код:
 	if(strcmp(cmdtext, "/update", true) == 0) {
		SendClientMessage(playerid, COLOR_GREEN,"Urmatorul update va fi pe data de 08.12.2012 ( Sambata ). ");
		return 1;
     }

Error:

Код:
C:\Users\Andrei\Desktop\Street Zone\gamemodes\STR.pwn(8797) : error 001: expected token: "-string end-", but found "-identifier-"
C:\Users\Andrei\Desktop\Street Zone\gamemodes\STR.pwn(8797) : warning 215: expression has no effect
C:\Users\Andrei\Desktop\Street Zone\gamemodes\STR.pwn(8797) : error 001: expected token: ";", but found "-string-"
C:\Users\Andrei\Desktop\Street Zone\gamemodes\STR.pwn(8797) : warning 215: expression has no effect
C:\Users\Andrei\Desktop\Street Zone\gamemodes\STR.pwn(8797) : error 001: expected token: ";", but found ")"
C:\Users\Andrei\Desktop\Street Zone\gamemodes\STR.pwn(8797) : fatal error 107: too many error messages on one line

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


4 Errors.



Re: Problem, please? - Bakr - 02.12.2012

Which line is the error on? I do not see anything wrong with those lines of code, so it may be on one of the lines preceding these.


Re: Problem, please? - maramizo - 02.12.2012

Add this to the top of your script.
pawn Код:
#define COLOR_GREEN 0x00FF33FF



Re: Problem, please? - Lonney - 02.12.2012

Quote:
Originally Posted by maramizo
Посмотреть сообщение
Add this to the top of your script.
pawn Код:
#define COLOR_GREEN 0x00FF33FF
I have already
pawn Код:
#define COLOR_GREEN 0x00FF33FF
.


Re: Problem, please? - Lonney - 03.12.2012

Can somebody help me?


Re: Problem, please? - B-Matt - 03.12.2012

PHP код:
    if (strcmp("/update"cmdtexttrue10) == 0)
    {
        
SendClientMessage(playeridCOLOR_GREEN,"Urmatorul update va fi pe data de 08.12.2012 ( Sambata ). ");
        return 
1;
    } 
It works.. For me.


Re: Problem, please? - Lonney - 03.12.2012

I have solved. For me, the problem is „( Sambata )” and I change it in „[ Sambata ]”


Re: Problem, please? - LarzI - 03.12.2012

The problem occured because " ) " ends the function. To put " ) " inside strings you need to do " \) "


Re: Problem, please? - Vince - 03.12.2012

Quote:
Originally Posted by LarzI
Посмотреть сообщение
The problem occured because " ) " ends the function. To put " ) " inside strings you need to do " \) "
Nonsense. Any valid character should work in a literal string. The only exeception being the double quotes.


Re: Problem, please? - LarzI - 03.12.2012

Quote:
Originally Posted by Vince
Посмотреть сообщение
Nonsense. Any valid character should work in a literal string. The only exeception being the double quotes.
pawn Код:
if(strcmp(cmdtext, "/update", true) == 0) {
        SendClientMessage(playerid, COLOR_GREEN,"Urmatorul update va fi pe data de 08.12.2012 ( Sambata ). ");
        return 1;
     }
Where are the so-called double quotes you speak of?