"SERVER: Unknown Command"
#1

So I made a object system thing and everything in it works, moving the objects, etc.

The system is saved and loaded using y_ini and it is working perfectly.

I wanted to save myself time from copying every value from each file manually and putting it in "CreateDynamicObject" when I export it for later use and made a command that does it for me.

Код:
CMD:conv(playerid)
{
new str[256], File:ftw=fopen("objects.txt", io_write);
for(new did=1; did<MAX_DOBJECTS; did++) // Dynamic Houses
{
	if(ObjectInfo[did][ObjectID] != 0){
		format(str, sizeof(str), "CreateDynamicObject(%d,%f,%f,%f,%f,%f,%f,-1,-1,-1,300.0,0.0);\n\r",ObjectInfo[did][ObjectID], ObjectInfo[did][ObjectX], ObjectInfo[did][ObjectY],ObjectInfo[did][ObjectZ],ObjectInfo[did][ObjectRX],ObjectInfo[did][ObjectRY],ObjectInfo[did][ObjectRZ]); // format
		fwrite(ftw, str);}
}
fclose(ftw);
return 1;
}
The only problem now is that when I type the command in-game, it returns me "SERVER: Unknown Command" and the "objects.txt" file is blank.

Any suggestions/help?
Reply
#2

It's related on save functions.
Reply
#3

And how can I make it work?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)