Problem with Runtime Error 6
#1

Код:
[15:30:17]  
[15:30:17]  
[15:30:17]  
[15:30:17] [debug] Run time error 6: "Invalid instruction"
[15:30:17] [debug]  Unknown opcode 0x0 at address 0x00024C00
[15:30:17] [debug] AMX backtrace:
[15:30:17] [debug] #0 00024c00 in main () from GCR.amx
[15:30:17] Script[gamemodes/GCR.amx]: Run time error 6: "Invalid instruction"
[15:30:17] Number of vehicle models: 0
Using crashdetect plugin, this is so far what I could get from the error. It is strange, many times I have created a server this way and it didn't give me this error.

Main function:
Код:
main();
What I do believe it is from is this:
pawn Код:
// this part in is my variables
new Text:CT_0;
new Text:CT_1;
new Text:CT_2;
new Text:CT_3;
new Text:CT_4;
new Text:CT_5;
new Text:CT_6;
new Text:CT_7;
new Text:CT_8;
new Text:CT_9;

new PlayerText:PL_Textdraw[MAX_PLAYERS];


// just some 2 functions in my Functions section.
stock ShowUserCTextdraw(playerid)
{
   TextDrawShowForPlayer(playerid, CT_0);
   TextDrawShowForPlayer(playerid, CT_1);
   TextDrawShowForPlayer(playerid, CT_2);
   TextDrawShowForPlayer(playerid, CT_3);
   TextDrawShowForPlayer(playerid, CT_4);
   TextDrawShowForPlayer(playerid, CT_5);
   TextDrawShowForPlayer(playerid, CT_6);
   TextDrawShowForPlayer(playerid, CT_7);
   TextDrawShowForPlayer(playerid, CT_8);
   TextDrawShowForPlayer(playerid, CT_9);
   PlayerTextDrawShow(playerid, PL_Textdraw[playerid]);
   return 1;
}

stock HideUserCTextdraw(playerid)
{
   TextDrawHideForPlayer(playerid, CT_0);
   TextDrawHideForPlayer(playerid, CT_1);
   TextDrawHideForPlayer(playerid, CT_2);
   TextDrawHideForPlayer(playerid, CT_3);
   TextDrawHideForPlayer(playerid, CT_4);
   TextDrawHideForPlayer(playerid, CT_5);
   TextDrawHideForPlayer(playerid, CT_6);
   TextDrawHideForPlayer(playerid, CT_7);
   TextDrawHideForPlayer(playerid, CT_8);
   TextDrawHideForPlayer(playerid, CT_9);
   PlayerTextDrawHide(playerid, PL_Textdraw[playerid]);
   return 1;
}

        // Under OnGamemodeInit
    CT_0 = TextDrawCreate(0.000000, 0.000000, "loadsc8:loadsc8");
    TextDrawLetterSize(CT_0, 0.000000, 0.000000);
    TextDrawTextSize(CT_0, 640.000000, 448.000000);
    TextDrawAlignment(CT_0, 1);
    TextDrawColor(CT_0, -1);
    TextDrawSetShadow(CT_0, 0);
    TextDrawSetOutline(CT_0, 0);
    TextDrawFont(CT_0, 4);

    CT_1 = TextDrawCreate(553.200012, 127.686668, "usebox");
    TextDrawLetterSize(CT_1, 0.000000, 20.219629);
    TextDrawTextSize(CT_1, 224.399993, 0.000000);
    TextDrawAlignment(CT_1, 1);
    TextDrawColor(CT_1, 0);
    TextDrawUseBox(CT_1, true);
    TextDrawBoxColor(CT_1, 102);
    TextDrawSetShadow(CT_1, 0);
    TextDrawSetOutline(CT_1, 0);
    TextDrawFont(CT_1, 0);

    CT_2 = TextDrawCreate(154.799987, 420.380004, "usebox");
    TextDrawLetterSize(CT_2, 0.000000, 1.923333);
    TextDrawTextSize(CT_2, 12.400000, 0.000000);
    TextDrawAlignment(CT_2, 1);
    TextDrawColor(CT_2, 0);
    TextDrawUseBox(CT_2, true);
    TextDrawBoxColor(CT_2, 102);
    TextDrawSetShadow(CT_2, 0);
    TextDrawSetOutline(CT_2, 0);
    TextDrawFont(CT_2, 0);

    CT_3 = TextDrawCreate(57.600006, 421.866729, "EXIT");
    TextDrawLetterSize(CT_3, 0.626000, 1.786666);
    TextDrawAlignment(CT_3, 1);
    TextDrawColor(CT_3, -5963521);
    TextDrawSetShadow(CT_3, 0);
    TextDrawSetOutline(CT_3, 1);
    TextDrawBackgroundColor(CT_3, 51);
    TextDrawFont(CT_3, 1);
    TextDrawSetProportional(CT_3, 1);
    TextDrawSetSelectable(CT_3, true);

    CT_4 = TextDrawCreate(517.200012, 150.086669, "usebox");
    TextDrawLetterSize(CT_4, 0.000000, 15.529256);
    TextDrawTextSize(CT_4, 256.399993, 0.000000);
    TextDrawAlignment(CT_4, 1);
    TextDrawColor(CT_4, 0);
    TextDrawUseBox(CT_4, true);
    TextDrawBoxColor(CT_4, 102);
    TextDrawSetShadow(CT_4, 0);
    TextDrawSetOutline(CT_4, 0);
    TextDrawFont(CT_4, 0);

    CT_5 = TextDrawCreate(292.799987, 126.933349, "Green Country Roleplay");
    TextDrawLetterSize(CT_5, 0.449999, 1.600000);
    TextDrawAlignment(CT_5, 1);
    TextDrawColor(CT_5, 16711935);
    TextDrawSetShadow(CT_5, 0);
    TextDrawSetOutline(CT_5, 1);
    TextDrawBackgroundColor(CT_5, 51);
    TextDrawFont(CT_5, 1);
    TextDrawSetProportional(CT_5, 1);

    CT_6 = TextDrawCreate(324.800048, 156.053390, "Welcome");
    TextDrawLetterSize(CT_6, 0.572399, 1.704533);
    TextDrawAlignment(CT_6, 1);
    TextDrawColor(CT_6, 8388863);
    TextDrawSetShadow(CT_6, 0);
    TextDrawSetOutline(CT_6, 1);
    TextDrawBackgroundColor(CT_6, 51);
    TextDrawFont(CT_6, 2);
    TextDrawSetProportional(CT_6, 1);

    CT_7 = TextDrawCreate(460.399993, 210.566665, "usebox");
    TextDrawLetterSize(CT_7, 0.000000, 5.822589);
    TextDrawTextSize(CT_7, 310.800018, 0.000000);
    TextDrawAlignment(CT_7, 1);
    TextDrawColor(CT_7, 0);
    TextDrawUseBox(CT_7, true);
    TextDrawBoxColor(CT_7, 102);
    TextDrawSetShadow(CT_7, 0);
    TextDrawSetOutline(CT_7, 0);
    TextDrawFont(CT_7, 0);

    CT_8 = TextDrawCreate(352.000000, 227.733413, "REGISTER");
    TextDrawLetterSize(CT_8, 0.449999, 1.600000);
    TextDrawAlignment(CT_8, 1);
    TextDrawColor(CT_8, -16776961);
    TextDrawSetShadow(CT_8, 0);
    TextDrawSetOutline(CT_8, 1);
    TextDrawBackgroundColor(CT_8, 51);
    TextDrawFont(CT_8, 1);
    TextDrawSetProportional(CT_8, 1);
    TextDrawSetSelectable(CT_8, true);

    CT_9 = TextDrawCreate(362.400024, 228.479995, "LOGIN");
    TextDrawLetterSize(CT_9, 0.449999, 1.600000);
    TextDrawAlignment(CT_9, 1);
    TextDrawColor(CT_9, 8388863);
    TextDrawSetShadow(CT_9, 0);
    TextDrawSetOutline(CT_9, 1);
    TextDrawBackgroundColor(CT_9, 51);
    TextDrawFont(CT_9, 1);
    TextDrawSetProportional(CT_9, 1);
    TextDrawSetSelectable(CT_9, true);


    // Connect Textdraw - under OnPlayerConnect
    PL_Textdraw[playerid] = CreatePlayerTextDraw(playerid, 360.000091, 179.946731, GetUserName(playerid));
    PlayerTextDrawLetterSize(playerid, PL_Textdraw[playerid], 0.449999, 1.600000);
    PlayerTextDrawAlignment(playerid, PL_Textdraw[playerid], 1);
    PlayerTextDrawColor(playerid, PL_Textdraw[playerid], 16777215);
    PlayerTextDrawSetShadow(playerid, PL_Textdraw[playerid], 0);
    PlayerTextDrawSetOutline(playerid, PL_Textdraw[playerid], 1);
    PlayerTextDrawBackgroundColor(playerid, PL_Textdraw[playerid], 51);
    PlayerTextDrawFont(playerid, PL_Textdraw[playerid], 1);
    PlayerTextDrawSetProportional(playerid, PL_Textdraw[playerid], 1);
Reply
#2

Try writing
Код:
main() { }
The braces are important, even if left empty.
Reply
#3

Neah... I tried....it still gives the error.
+ At first it was
Код:
main ( )
{
   print("......");
   .....
}
Really, noone knows ? ...
Reply
#4

Maybe you are not loading the required plugins in server.cfg.
Reply
#5

Nope, they are all here
Код:
plugins sscanf Whirlpool streamer
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)