SA-MP Forums Archive
[SAP] JUST OPEN !! - 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: [SAP] JUST OPEN !! (/showthread.php?tid=621412)



[SAP] JUST OPEN !! - Yaa - 10.11.2016

Hello

Errors :

PHP код:
D:\pawno-master\include\SAPData/Config.json(31) : error 006must be assigned to an array
D:\pawno-master\include\SAPData/Config.json(32) : error 006must be assigned to an array
D:\pawno-master\include\SAPData/Config.json(33) : error 006must be assigned to an array
D:\pawno-master\include\SAPData/Config.json(34) : error 006must be assigned to an array 
Code:

PHP код:
 enum ServerConfig
 
{
    
gameModeText,
    
serverName,
    
serverForum,
    
serverWebsite,
    
ircBot1,
    
ircBot2,
    
ircServer
 
};
new 
Server[ServerConfig];
public 
jsonInit()
{
    
Server[gameModeText] = "SAP 7.1 REVO";
    
Server[serverName] = "San Andreas Playground";
    
Server[serverForum] = "forum.saplayground.com";
    
Server[serverWebsite] = "saplayground.com";
    
/*Server[ircBot1] = "StrikerX";
    Server[ircBot2] = "ZeroX";
    Server[ircServer] = "irc.gtanet.com";*/
    
return (true);
 } 
Thanks

Yaa


Re: [SAP] JUST OPEN !! - Yaa - 10.11.2016

Still same errors :/

and i don't think this is a fix for this :C


Re: [SAP] JUST OPEN !! - Konstantinos - 10.11.2016

All the items in the enumerator must be strings and not integers.


Re: [SAP] JUST OPEN !! - Yaa - 10.11.2016

speak with me with codes pls


Re: [SAP] JUST OPEN !! - ThatFag - 10.11.2016

Код:
 #define gamemodetext   "The Gamemode text"
usage

Код:
 SendClientMessage(playerid,COLOR_RED,"    The Gamemode shows >> "gamemodetext   "! ");
isnt this same you want to create?


Re: [SAP] JUST OPEN !! - Yaa - 10.11.2016

nope


Re: [SAP] JUST OPEN !! - mkr - 10.11.2016

PHP код:
 enum ServerConfig
 
{
    
gameModeText[32],
    
serverName[32],
    
serverForum[32],
    
serverWebsite[32],
    
ircBot1[32],
    
ircBot2[32],
    
ircServer[32]
 };
new 
Server[ServerConfig];
public 
jsonInit()
{
    
Server[gameModeText] = "SAP 7.1 REVO";
    
Server[serverName] = "San Andreas Playground";
    
Server[serverForum] = "forum.saplayground.com";
    
Server[serverWebsite] = "saplayground.com";
    
/*Server[ircBot1] = "StrikerX";
    Server[ircBot2] = "ZeroX";
    Server[ircServer] = "irc.gtanet.com";*/
    
return (true);
 } 
The fields in your enum were integers, they need to be arrays in order to assign strings to them.


Re: [SAP] JUST OPEN !! - Yaa - 10.11.2016

FIXED ! Thanks @mkr


Re: [SAP] JUST OPEN !! - Yaa - 10.11.2016

STILL SAME :C

EDIT FIX AGAIN JAJAJAJA