I'm missed a ";"
#1

Direct to problem:
I'm have a code:
Код:
//--------------------------------------------------------------------------
	// -> Server's 3D Texts
	//--------------------------------------------------------------------------
	strcat(SpawnPlace3D, "{0072FF}Spawn Zone\n\
    					  {00FF00}Type {FF0000}/HM {00FF00}for free Heal & Armour!\n\
			 			  {0072FF}www.XSW-Servers.com");<======LINE----------------------
	//--------------------------------------------------------------------------
 	Create3DTextLabel(SpawnPlace3D, BLUE, 404.2386,2453.6709,16.6602,	  50, 0, 0); // AA
I'm know,i'm missed a ';'
but i'm not know where...
[sorry for my bad english]
ERROR:
Код:
expected token: ";", but found "-identifier-"
Thanks
Reply
#2

For each new line of text you're adding in this way, you need to close the string and open it again. By doing "\
Код:
strcat(SpawnPlace3D, "{0072FF}Spawn Zone\n" \
    					  "{00FF00}Type {FF0000}/HM {00FF00}for free Heal & Armour!\n" \
			 			  "{0072FF}www.XSW-Servers.com");
Also, why not just create a variable and set it directly instead of using strcat?

Код:
new SpawnPlace3D[] = {"{0072FF}Spawn Zone\n" \
    					  "{00FF00}Type {FF0000}/HM {00FF00}for free Heal & Armour!\n" \
			 			  "{0072FF}www.XSW-Servers.com"};
Reply
#3

Quote:
Originally Posted by [WSF]ThA_Devil
Посмотреть сообщение
For each new line of text you're adding in this way, you need to close the string and open it again. By doing "\
Код:
strcat(SpawnPlace3D, "{0072FF}Spawn Zone\n" \
    					  "{00FF00}Type {FF0000}/HM {00FF00}for free Heal & Armour!\n" \
			 			  "{0072FF}www.XSW-Servers.com");
Also, why not just create a variable and set it directly instead of using strcat?

Код:
new SpawnPlace3D[] = {{0072FF}Spawn Zone\n" \
    					  "{00FF00}Type {FF0000}/HM {00FF00}for free Heal & Armour!\n" \
			 			  "{0072FF}www.XSW-Servers.com"};
Not work for me,
Again this error.
Reply
#4

Quote:
Originally Posted by Longover
Посмотреть сообщение
Not work for me,
Again this error.
I just tested the code and either of these work fine. Try to comment them out of the code and see if you haven't missed an end quote somewhere.

Looks like I missed a quote mark in this one:
Код:
new SpawnPlace3D[] = {"{0072FF}Spawn Zone\n" \
    					  "{00FF00}Type {FF0000}/HM {00FF00}for free Heal & Armour!\n" \
			 			  "{0072FF}www.XSW-Servers.com"};
Reply
#5

The error is probably in line above then
Reply
#6

PHP код:
new Text3D:SpawnPlace3Dstring[256];
format(stringsizeof(string), "{0072FF}Spawn Zone\n\
{00FF00}Type {FF0000}/HM {00FF00}for free Heal & Armour!\n\
{0072FF}www.XSW-Servers.com"
);
SpawnPlace3D Create3DTextLabel(string0x0000FFFF404.23862453.670916.660240.000); 
Reply
#7

Quote:
Originally Posted by Lirbo
Посмотреть сообщение
PHP код:
new Text3D:SpawnPlace3Dstring[256];
format(stringsizeof(string), "{0072FF}Spawn Zone\n\
{00FF00}Type {FF0000}/HM {00FF00}for free Heal & Armour!\n\
{0072FF}www.XSW-Servers.com"
);
SpawnPlace3D Create3DTextLabel(string0x0000FFFF404.23862453.670916.660240.000); 
I's work,but nou i'm have this errors:
Код:
C:\Users\Sorin\Desktop\eXtreme Stunt World\XSW V1\gamemodes\XSW_Full.pwn(702) : warning 217: loose indentation
C:\Users\Sorin\Desktop\eXtreme Stunt World\XSW V1\gamemodes\XSW_Full.pwn(704) : warning 217: loose indentation
in lines:
Код:
		format(string, sizeof(string), "{0072FF}Spawn Zone\n\
										{00FF00}Type {FF0000}/HM {00FF00}for free Heal & Armour!\n\
										{0072FF}www.XSW-Servers.com");------------------------<
	//--------------------------------------------------------------------------
 	Create3DTextLabel(string, BLUE, 404.2386,2453.6709,16.6602,	  50, 0, 0); // AA------------------------<
    Create3DTextLabel(string, BLUE, 1887.8350,-2625.3059,13.6016,   50, 0, 0); // LSAir
    Create3DTextLabel(string, BLUE, -1370.0363,-256.3452,18.7700,   50, 0, 0); // SFAir
    Create3DTextLabel(string, BLUE, 1602.5377,1311.2509,13.6200, 	  50, 0, 0); // LVAir
    Create3DTextLabel(string, BLUE, -2345.4111,-1623.9098,483.9355, 50, 0, 0); // Chilliad
    Create3DTextLabel(string, BLUE, 1420.3746,2773.9958,11.0972,    50, 0, 0); // Stunt Golf
Reply
#8

Quote:
Originally Posted by Longover
Посмотреть сообщение
I's work,but nou i'm have this errors:
Код:
C:\Users\Sorin\Desktop\eXtreme Stunt World\XSW V1\gamemodes\XSW_Full.pwn(702) : warning 217: loose indentation
C:\Users\Sorin\Desktop\eXtreme Stunt World\XSW V1\gamemodes\XSW_Full.pwn(704) : warning 217: loose indentation
in lines:
Код:
		format(string, sizeof(string), "{0072FF}Spawn Zone\n\
										{00FF00}Type {FF0000}/HM {00FF00}for free Heal & Armour!\n\
										{0072FF}www.XSW-Servers.com");------------------------<
	//--------------------------------------------------------------------------
 	Create3DTextLabel(string, BLUE, 404.2386,2453.6709,16.6602,	  50, 0, 0); // AA------------------------<
    Create3DTextLabel(string, BLUE, 1887.8350,-2625.3059,13.6016,   50, 0, 0); // LSAir
    Create3DTextLabel(string, BLUE, -1370.0363,-256.3452,18.7700,   50, 0, 0); // SFAir
    Create3DTextLabel(string, BLUE, 1602.5377,1311.2509,13.6200, 	  50, 0, 0); // LVAir
    Create3DTextLabel(string, BLUE, -2345.4111,-1623.9098,483.9355, 50, 0, 0); // Chilliad
    Create3DTextLabel(string, BLUE, 1420.3746,2773.9958,11.0972,    50, 0, 0); // Stunt Golf

PHP код:
    format(stringsizeof(string), "{0072FF}Spawn Zone\n\{00FF00}Type {FF0000}/HM {00FF00}for free Heal & Armour!\n\{0072FF}www.XSW-Servers.com");------------------------<
    
//--------------------------------------------------------------------------
    
Create3DTextLabel(stringBLUE404.2386,2453.6709,16.6602,      5000); // AA------------------------<
    
Create3DTextLabel(stringBLUE1887.8350,-2625.3059,13.6016,   5000); // LSAir
    
Create3DTextLabel(stringBLUE, -1370.0363,-256.3452,18.7700,   5000); // SFAir
    
Create3DTextLabel(stringBLUE1602.5377,1311.2509,13.6200,       5000); // LVAir
    
Create3DTextLabel(stringBLUE, -2345.4111,-1623.9098,483.93555000); // Chilliad
    
Create3DTextLabel(stringBLUE1420.3746,2773.9958,11.0972,    5000); // Stunt Golf 
Try this.
Reply
#9

Quote:
Originally Posted by Longover
Посмотреть сообщение
I's work,but nou i'm have this errors:
Код:
C:\Users\Sorin\Desktop\eXtreme Stunt World\XSW V1\gamemodes\XSW_Full.pwn(702) : warning 217: loose indentation
C:\Users\Sorin\Desktop\eXtreme Stunt World\XSW V1\gamemodes\XSW_Full.pwn(704) : warning 217: loose indentation
in lines:
Код:
		format(string, sizeof(string), "{0072FF}Spawn Zone\n\
										{00FF00}Type {FF0000}/HM {00FF00}for free Heal & Armour!\n\
										{0072FF}www.XSW-Servers.com");------------------------<
	//--------------------------------------------------------------------------
 	Create3DTextLabel(string, BLUE, 404.2386,2453.6709,16.6602,	  50, 0, 0); // AA------------------------<
    Create3DTextLabel(string, BLUE, 1887.8350,-2625.3059,13.6016,   50, 0, 0); // LSAir
    Create3DTextLabel(string, BLUE, -1370.0363,-256.3452,18.7700,   50, 0, 0); // SFAir
    Create3DTextLabel(string, BLUE, 1602.5377,1311.2509,13.6200, 	  50, 0, 0); // LVAir
    Create3DTextLabel(string, BLUE, -2345.4111,-1623.9098,483.9355, 50, 0, 0); // Chilliad
    Create3DTextLabel(string, BLUE, 1420.3746,2773.9958,11.0972,    50, 0, 0); // Stunt Golf
look at your code, the first Create3DTextLabel is not at the same place as the others, it has a few spaces, fix it.
same goes for the format(string ....

Код:
    format(string, sizeof(string), "{0072FF}Spawn Zone\n\
    {00FF00}Type {FF0000}/HM {00FF00}for free Heal & Armour!\n\
    {0072FF}www.XSW-Servers.com");

    Create3DTextLabel(string, BLUE, 404.2386,2453.6709,16.6602,	  50, 0, 0); // AA
    Create3DTextLabel(string, BLUE, 1887.8350,-2625.3059,13.6016,   50, 0, 0); // LSAir
    Create3DTextLabel(string, BLUE, -1370.0363,-256.3452,18.7700,   50, 0, 0); // SFAir
    Create3DTextLabel(string, BLUE, 1602.5377,1311.2509,13.6200, 	  50, 0, 0); // LVAir
    Create3DTextLabel(string, BLUE, -2345.4111,-1623.9098,483.9355, 50, 0, 0); // Chilliad
    Create3DTextLabel(string, BLUE, 1420.3746,2773.9958,11.0972,    50, 0, 0); // Stunt Golf
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)