SA-MP Forums Archive
HELP ME: Pawno errors again :3 - 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 ME: Pawno errors again :3 (/showthread.php?tid=498791)



HELP ME: Pawno errors again :3 - ChristianIvann09 - 05.03.2014

Код:
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 )
        format( a_level_string, sizeof ( a_level_string ), "Server Moderator" );
FULL CODE:
Код:
//GetAdminLevelStock//
stock GetPlayerAdminLevel(playerid)
{
    new
        a_level_string[ 128 ];

    if ( userData[ playerid ][ Admin_Level ] == 1 )
        format( a_level_string, sizeof ( a_level_string ), "Server Moderator" );
    else if ( userData[ playerid ][ Admin_Level ] == 2 )
        format( a_level_string, sizeof ( a_level_string ), "Junior Admin" );
    else if ( userData[ playerid ][ Admin_Level ] == 3 )
        format( a_level_string, sizeof ( a_level_string ), "Senior Admin" );
    else if ( userData[ playerid ][ Admin_Level ] == 4 )
        format( a_level_string, sizeof ( a_level_string ), "Head Admin" );
    else if ( userData[ playerid ][ Admin_Level ] == 5 )
        format( a_level_string, sizeof ( a_level_string ), "Server Co Owner" );
    else if ( userData[ playerid ][ Admin_Level ] == 6 )
        format( a_level_string, sizeof ( a_level_string ), "Server Owner" );
    else
        format( a_level_string, sizeof ( a_level_string ), "Unknown admin level!" );

    return a_level_string;
}
////////////////////////////////////////////////////////



Re: HELP ME: Pawno errors again :3 - ChristianIvann09 - 05.03.2014

Yea how to fix that errors?


Re: HELP ME: Pawno errors again :3 - daniscape - 06.03.2014

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

    if ( userData[ playerid ][ Admin_Level ] == 1 )
        format( a_level_string, sizeof ( a_level_string ), "Server Moderator" );,
    else if ( userData[ playerid ][ Admin_Level ] == 2 )
        format( a_level_string, sizeof ( a_level_string ), "Junior Admin" );,
    else if ( userData[ playerid ][ Admin_Level ] == 3 )
        format( a_level_string, sizeof ( a_level_string ), "Senior Admin" );,
    else if ( userData[ playerid ][ Admin_Level ] == 4 )
        format( a_level_string, sizeof ( a_level_string ), "Head Admin" );,
    else if ( userData[ playerid ][ Admin_Level ] == 5 )
        format( a_level_string, sizeof ( a_level_string ), "Server Co Owner" );,
    else if ( userData[ playerid ][ Admin_Level ] == 6 )
        format( a_level_string, sizeof ( a_level_string ), "Server Owner" );,
    else
        format( a_level_string, sizeof ( a_level_string ), "Unknown admin level!" );

    return a_level_string;
}

//try this not sure if it will work