SA-MP Forums Archive
1 Error - 1 Warring : - 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: 1 Error - 1 Warring : (/showthread.php?tid=607363)



1 Error - 1 Warring : - RedRex - 18.05.2016

Help to To Fix this Shit lol

Код:
(264) : error 010: invalid function or declaration
I already make a zones but dont know Why there is a bug Help me ..
PHP код:
new Zones;
   
"Zone 1", 1861, -1253.5, 2063, -1153.5, 0xFF0000FF },
   
"Zone 1", 2080, -1252.5, 2156, -1193.5, 0xFF0000FF },
   
"Zone 3", 2331, -1728.5, 2572, -1625.5, 0xFF0000FF },
   
"Zone 4", 1433, -1729.5, 1588, -1602.5, 0xFF0000FF },
   
"Zone 5", 1944, -1748.5, 2097, -1614.5, 0xFF0000FF }, 
And help me to fix this warring

PHP код:
warning 203: symbol is never used: "Zones" 



Re: 1 Error - 1 Warring : - RedRex - 18.05.2016

help me!!!


Re: 1 Error - 1 Warring : - oMa37 - 18.05.2016

I didn't really understand what this define supposed to do, But maybe you wanted something like this?

PHP код:
new Zones[][]=
{
   
"Zone 1", 1861, -1253.5, 2063, -1153.5, 0xFF0000FF }, 
   
"Zone 1", 2080, -1252.5, 2156, -1193.5, 0xFF0000FF }, 
   
"Zone 3", 2331, -1728.5, 2572, -1625.5, 0xFF0000FF }, 
   
"Zone 4", 1433, -1729.5, 1588, -1602.5, 0xFF0000FF }, 
   
"Zone 5", 1944, -1748.5, 2097, -1614.5, 0xFF0000FF }
} 



Re: 1 Error - 1 Warring : - RedRex - 18.05.2016

Код:
(260) : error 020: invalid symbol name ""
line 260
PHP код:
   "Zone 2", 2080, -1252.5, 2156, -1193.5, 0xFF0000FF }, 



Re: 1 Error - 1 Warring : - F1N4L - 18.05.2016

Use a enum, because you are using Float + Integer + String.


Re: 1 Error - 1 Warring : - RedRex - 18.05.2016

Quote:
Originally Posted by F1N4L
Посмотреть сообщение
Use a enum, because you are using Float + Integer + String.
Good Good now wwhat happend here

i thing the enum is worked yes but i dont know how to use it ? did it right ?

Код:
(260) : error 001: expected token: "-identifier-", but found "{"
PHP код:
enum Zones
{
   {
1861, -1253.5, 2063, -1153.5, 0xFF0000FF },
   {
2080, -1252.5, 2156, -1193.5, 0xFF0000FF },
   {
2331, -1728.5, 2572, -1625.5, 0xFF0000FF },
   {
1433, -1729.5, 1588, -1602.5, 0xFF0000FF },
   {
1944, -1748.5, 2097, -1614.5, 0xFF0000FF }
} 



Re: 1 Error - 1 Warring : - Slawiii - 18.05.2016

try this

PHP код:
enum zoneSpawns
{
    
zSpawn_Name[256],
    
Float:zSpawn_X,
    
Float:zSpawn_Y,
    
Float:zSpawn_Z,
    
Float:zSpawn_A,
    
zColor[12]
};

new 
Float:Zones[][zoneSpawns] =
{
   { 
"Zone 1", 1861, -1253.5, 2063, -1153.5, 0xFF0000FF },
   { 
"Zone 2", 2080, -1252.5, 2156, -1193.5, 0xFF0000FF },
   { 
"Zone 3", 2331, -1728.5, 2572, -1625.5, 0xFF0000FF },
   { 
"Zone 4", 1433, -1729.5, 1588, -1602.5, 0xFF0000FF },
   { 
"Zone 5", 1944, -1748.5, 2097, -1614.5, 0xFF0000FF }
}; 



Re: 1 Error - 1 Warring : - RedRex - 18.05.2016

Quote:
Originally Posted by Slawiii
Посмотреть сообщение
try this

PHP код:
enum zoneSpawns
{
    
zSpawn_Name[256],
    
Float:zSpawn_X,
    
Float:zSpawn_Y,
    
Float:zSpawn_Z,
    
Float:zSpawn_A,
    
zColor[12]
};
new 
Float:Zones[][zoneSpawns] =
{
   { 
"Zone 1", 1861, -1253.5, 2063, -1153.5, 0xFF0000FF },
   { 
"Zone 2", 2080, -1252.5, 2156, -1193.5, 0xFF0000FF },
   { 
"Zone 3", 2331, -1728.5, 2572, -1625.5, 0xFF0000FF },
   { 
"Zone 4", 1433, -1729.5, 1588, -1602.5, 0xFF0000FF },
   { 
"Zone 5", 1944, -1748.5, 2097, -1614.5, 0xFF0000FF }
}; 
+rep but help me for this warring
Код:
warning 203: symbol is never used: "Zones"



Re: 1 Error - 1 Warring : - J0sh... - 18.05.2016

You need to use it.


Re: 1 Error - 1 Warring : - Infinity - 18.05.2016

Do you actually read the errors/warnings?