Script is doing wierd.
#1

I don't know why this is happening. But I have recently made a command "/giftbox" which display's the following enum.

Код:
#define MAX_BOX 1
enum boxE {
    boxID,
    boxTitle[32],
    boxStatus,
    boxVehicle,
    boxMoney,
	boxFireWorks,
	boxClearWarns,
	boxClearFP,
	boxHidden,
	boxMats,
	boxPP,
	boxTime[32],

new boxVariables[MAX_BOX][boxE];
}
This is the command.

Код:
CMD:giftbox(playerid, params[])
{
	if(playerVariables[playerid][pAdminLevel] != 6) return SCM(playerid, -1, AdminOnly);
	new string[256];
	format(string, sizeof(string), "[%s][%s][%d][%d][%d][%d][%d][%d][%d][%d][%d]", boxVariables[0][boxTime], boxVariables[0][boxTitle], boxVariables[0][boxStatus], 
	boxVariables[0][boxVehicle], boxVariables[0][boxMoney], boxVariables[0][boxFireWorks], boxVariables[0][boxClearWarns], boxVariables[0][boxClearFP], boxVariables[0][boxHidden],
	boxVariables[0][boxMats], boxVariables[0][boxPP]);
	SendClientMessage(playerid, 0xFFCFFFCFFF, string);
	return 1;
}
Nothing happened before I made this command.
The script compiles just fine, but most parts of the gamemode are not loading, event the "Mode" is saying "Unknown".
If I remove that command and restart my pc, everything works again. But after I add it again and compile it, it fucks up again. And I have to restart my pc for it to work again after I remove it. Else, it won't fix anything.

Also, I have no errors in the logs. And I have all the plugins and includes.
Reply
#2

Код:
#define MAX_BOX 1
enum boxE 
{
    boxID,
    boxTitle[32],
    boxStatus,
    boxVehicle,
    boxMoney,
    boxFireWorks,
    boxClearWarns,
    boxClearFP,
    boxHidden,
    boxMats,
    boxPP,
    boxTime[32]
};

new boxVariables[MAX_BOX][boxE];
enums are usually like this, try
Reply
#3

Quote:
Originally Posted by Shinja
Посмотреть сообщение
Код:
#define MAX_BOX 1
enum boxE 
{
    boxID,
    boxTitle[32],
    boxStatus,
    boxVehicle,
    boxMoney,
    boxFireWorks,
    boxClearWarns,
    boxClearFP,
    boxHidden,
    boxMats,
    boxPP,
    boxTime[32]
};

new boxVariables[MAX_BOX][boxE];
enums are usually like this, try
Nope, not working.
Reply
#4

PHP код:
#define MAX_BOX 1
enum boxE 
{
    
boxID,
    
boxTitle[32],
    
boxStatus,
    
boxVehicle,
    
boxMoney,
    
boxFireWorks,
    
boxClearWarns,
    
boxClearFP,
    
boxHidden,
    
boxMats,
    
boxPP,
    
boxTime[32]
}
new 
boxVariables[MAX_BOX][boxE]; 
Reply
#5

Then you aren't loading a plugin correctly, is this your first zcmd?
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)