SA-MP Forums Archive
[HELP] How to fix this?? (Pawno Errors) - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] How to fix this?? (Pawno Errors) (/showthread.php?tid=498786)



[HELP] How to fix this?? (Pawno Errors) - ChristianIvann09 - 05.03.2014

So, i make an /a(dmin) chat script then suddenly i got these errors

I got 3 errors

Код:
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(35185) : error 029: invalid expression, assumed zero
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(35190) : error 017: undefined symbol "GetPlayerAdminLevel"
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(35191) : error 017: undefined symbol "SendAdminMessage"
Line 35185:
Код:
{
Line 35190:
Код:
format(szMessage, sizeof(szMessage), "** %s{FFFFFF} %s: %s **", GetPlayerAdminLevel(playerid), GetPlayerNameEx(playerid), params);
Line 35191:
Код:
SendAdminMessage(COLOR_WHITE, szMessage);



Re: [HELP] How to fix this?? (Pawno Errors) - HK - 05.03.2014

You haven't defined stock GetPlayerAdminLevel.


Re: [HELP] How to fix this?? (Pawno Errors) - ChristianIvann09 - 05.03.2014

Quote:
Originally Posted by HK
Посмотреть сообщение
You haven't defined stock GetPlayerAdminLevel.
how to Define then?

help me


Re: [HELP] How to fix this?? (Pawno Errors) - GalaxyHostFree - 05.03.2014

Sample

Код HTML:
stock GetPlayerAdminLevel(playerid)
{
    new
        a_level_string[ 128 ];

    if ( userData[ playerid ][ Admin_Level ] == 1 )
        format( a_level_string, sizeof ( a_level_string ), "Mod" );
    else if ( userData[ playerid ][ Admin_Level ] == 2 )
        format( a_level_string, sizeof ( a_level_string ), "Super Mod" );
    else if ( userData[ playerid ][ Admin_Level ] == 3 )
        format( a_level_string, sizeof ( a_level_string ), "Admin" );
    else if ( userData[ playerid ][ Admin_Level ] == 4 )
        format( a_level_string, sizeof ( a_level_string ), "Owner" );
    else
        format( a_level_string, sizeof ( a_level_string ), "Unknown admin level!" );

    return a_level_string;
}
Full tutorial
Tutorial


Re: [HELP] How to fix this?? (Pawno Errors) - ChristianIvann09 - 05.03.2014

Quote:
Originally Posted by GalaxyHostFree
Посмотреть сообщение
Sample

Код HTML:
stock GetPlayerAdminLevel(playerid)
{
    new
        a_level_string[ 128 ];

    if ( userData[ playerid ][ Admin_Level ] == 1 )
        format( a_level_string, sizeof ( a_level_string ), "Mod" );
    else if ( userData[ playerid ][ Admin_Level ] == 2 )
        format( a_level_string, sizeof ( a_level_string ), "Super Mod" );
    else if ( userData[ playerid ][ Admin_Level ] == 3 )
        format( a_level_string, sizeof ( a_level_string ), "Admin" );
    else if ( userData[ playerid ][ Admin_Level ] == 4 )
        format( a_level_string, sizeof ( a_level_string ), "Owner" );
    else
        format( a_level_string, sizeof ( a_level_string ), "Unknown admin level!" );

    return a_level_string;
}
thank u very much

where do i put it?? under??


Re: [HELP] How to fix this?? (Pawno Errors) - ChristianIvann09 - 05.03.2014

Quote:
Originally Posted by GalaxyHostFree
Посмотреть сообщение
Sample

Код HTML:
stock GetPlayerAdminLevel(playerid)
{
    new
        a_level_string[ 128 ];

    if ( userData[ playerid ][ Admin_Level ] == 1 )
        format( a_level_string, sizeof ( a_level_string ), "Mod" );
    else if ( userData[ playerid ][ Admin_Level ] == 2 )
        format( a_level_string, sizeof ( a_level_string ), "Super Mod" );
    else if ( userData[ playerid ][ Admin_Level ] == 3 )
        format( a_level_string, sizeof ( a_level_string ), "Admin" );
    else if ( userData[ playerid ][ Admin_Level ] == 4 )
        format( a_level_string, sizeof ( a_level_string ), "Owner" );
    else
        format( a_level_string, sizeof ( a_level_string ), "Unknown admin level!" );

    return a_level_string;
}
Full tutorial
Tutorial
I got errors again when i add that

Код:
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(958) : error 017: undefined symbol "userData"
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(958) : warning 215: expression has no effect
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(958) : error 001: expected token: ";", but found "]"
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(958) : error 029: invalid expression, assumed zero
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(958) : fatal error 107: too many error messages on one line



Re: [HELP] How to fix this?? (Pawno Errors) - ChristianIvann09 - 05.03.2014

What is this

fatal error 100: cannot read from file: "YSI\internal\y_masteronce"


Re: [HELP] How to fix this?? (Pawno Errors) - ChristianIvann09 - 05.03.2014

I got errors again

Код:
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(959) : error 017: undefined symbol "userData"
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(959) : warning 215: expression has no effect
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(959) : error 001: expected token: ";", but found "]"
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(959) : error 029: invalid expression, assumed zero
C:\Users\Cris\Desktop\0.3z Server\ASRP (LRP script)\gamemodes\ASRP_V2.0.pwn(959) : fatal error 107: too many error messages on one line
Код:
Line 959: if ( userData[ playerid ][ Admin_Level ] == 1 )



Re: [HELP] How to fix this?? (Pawno Errors) - GalaxyHostFree - 05.03.2014

I don't know what they call it but change it to which variable for storing player data. you can find it in your GM or FS script above.

If you couldn't find it then paste your Gm/FS in pastebin.com

fatal error 100: cannot read from file: "YSI\internal\y_masteronce"

Make sure you have the YSI pack folder in your pawno/include folder

Download it from here Inc y_ini Look for the DOWNLOAD