EditObject crashing!!
#1

I made this:

Код:
new object;

object = CreateObject(1337, 1647.33, -2322.48, -2.84564, 0.0, 0.0, 0.0);

CMD:edit(playerid, params[])
{
	EditObject(playerid, object);
	SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: You now edit the object!");
	return 1;
}
And it crashessss meeee..........
Reply
#2

You need to provide more details. What crashes? The client or server? Do you have a crash address? Does it happen with other objects or only this particular model? Do you have any mods installed? Does it work on other servers? Are you sure this is the source of the crash and nothing else?
Reply
#3

I have fixed it, just restarted computer.
And it was client crash.

Another problem..
I made an object editor in game which saves to MySQL.

This is the insert stock

pawn Код:
stock AddObjectToFile(objectid, modelid, desc[], Float:LX, Float:LY, Float:LZ)
{
    new Query[200];
    format(Query, sizeof(Query), "INSERT INTO `objects` (model, posx, posy, posz) VALUES(%d, %f, %f, %f)", modelid, LX, LY, LZ);
    mysql_function_query(dbHandle, Query, true, "OnObjectInsert", "d", objectid);
    return 1;
}
As you can see there, desc[].

When i'm trying to use it:
pawn Код:
stock AddObjectToFile(objectid, modelid, desc[], Float:LX, Float:LY, Float:LZ)
{
    new Query[200];
    format(Query, sizeof(Query), "INSERT INTO `objects` (model, posx, posy, posz, desc) VALUES(%d, %f, %f, %f, '%s')", modelid, LX, LY, LZ, desc);
    mysql_function_query(dbHandle, Query, true, "OnObjectInsert", "d", objectid);
    return 1;
}

It gives me an error...
Reply
#4

The size of the Query string may be too short. Try increasing it to something like 250. I can't give you the exact solution because you aren't specific at all in your posts.
Reply
#5

Nevermind, i've fixed it finallyyyyyyyyyy
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)