[BUG] Sa-Mp wiki scripting mistake :D
#1

I think this is wrong:

Код:
new object;
public OnGameModeInit()
{
    object = CreateObject(1337, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
}
 
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/oedit", true))
    {
        EditObject(playerid, objectid);
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: You can now edit the object!");
        return 1;
    }
    return 0;
}
It should be like this?

Код:
new object;
public OnGameModeInit()
{
    object = CreateObject(1337, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0);
}
 
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/oedit", true))
    {
        EditObject(playerid, object);
        SendClientMessage(playerid, 0xFFFFFFFF, "SERVER: You can now edit the object!");
        return 1;
    }
    return 0;
}
Reply
#2

What's the difference? xD Sorry haha.

EDIT: Now I saw it, yes I think that is supposed to be like the way you write it.
Reply
#3

Yeah sure it is If u compile the script on wiki-samp you'll get the error: undefined symbol "objectid"
Reply
#4

next time put the link were is located the bug, it's better to help beta tester or someone can edit wiki, to correct that small "bug".
Reply
#5

Fixed.
Reply
#6

Quote:
Originally Posted by Gamer_Z
Посмотреть сообщение
yup and it's not mandatory but if you want to be formal, a return 1; needs to be at the end of the OnGameModeInit
Done.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)