OnPlayerRequestClass error
#1

../gamemodes/AccountSetup.pwn(4) : warning 225: unreachable code
../gamemodes/AccountSetup.pwn(4) : error 029: invalid expression, assumed zero
../gamemodes/AccountSetup.pwn(4) : error 017: undefined symbol "classid"
../gamemodes/AccountSetup.pwn(4) : error 029: invalid expression, assumed zero
../gamemodes/AccountSetup.pwn(4) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase


4 Errors.


Код HTML:
public OnPlayerRequestClass(playerid, classid)
{
    SetPVarInt(playerid, "BeingBanned", 0);
    if(IsPlayerNPC(playerid))
	{
		new i = -1;
		i = GetNPCID(playerid);
        if(i != -1) {
            NPCInfo[i][nUsed]=1;
            SetSpawnInfo(playerid, 69, NPCInfo[i][nModel], NPCInfo[i][n_X], NPCInfo[i][n_Y], NPCInfo[i][n_Z], NPCInfo[i][n_A], -1,-1,-1,-1,-1,-1);
            SetPlayerFacingAngle(playerid, NPCInfo[i][n_A]);
            SetPlayerInterior(playerid, NPCInfo[i][nInt]);
            SetPlayerVirtualWorld(playerid, NPCInfo[i][nWorld]);
			//=====//
            switch(NPCInfo[i][nType])
            {
                case NPC_TYPE_BUS_1: {
                    PutPlayerInVehicle(playerid, BotBus, 0);
                }
                case NPC_TYPE_BUS_2: {
                    PutPlayerInVehicle(playerid, BotBus2, 0);
                }
                case NPC_TYPE_TRAIN: {
                    PutPlayerInVehicle(playerid, BotTrain, 0);
                }
            }
        }
	    return 1;
	}
    else
    {
        SpawnPlayer(playerid);
        if(GetPVarInt(playerid, "PlayerLogged") == 1) return SpawnPlayer(playerid);
		ClearChatbox(playerid, 50);
		CheckIfBanned(playerid);
		//==============================//
		TogglePlayerSpectating(playerid, 1);
	    //==============================//
	    TextDrawShowForPlayer(playerid, SideBar1);
	    TextDrawShowForPlayer(playerid, SideBar2);
	    //==============================//
		CheckAccount(playerid, 1);
	    //==============================//
	    SetTimerEx("LoginCamera", 500, false, "i", playerid);
	    //==============================//
    }
	return 1;
}
Reply
#2

i think ur missing a bracket.
Reply
#3

Код:
public OnPlayerRequestClass(playerid, classid)
{
    SetPVarInt(playerid, "BeingBanned", 0);
    if(IsPlayerNPC(playerid))
	{
		new i = -1;
		i = GetNPCID(playerid);
        if(i != -1) {
            NPCInfo[i][nUsed]=1;
            SetSpawnInfo(playerid, 69, NPCInfo[i][nModel], NPCInfo[i][n_X], NPCInfo[i][n_Y], NPCInfo[i][n_Z], NPCInfo[i][n_A], -1,-1,-1,-1,-1,-1);
            SetPlayerFacingAngle(playerid, NPCInfo[i][n_A]);
            SetPlayerInterior(playerid, NPCInfo[i][nInt]);
            SetPlayerVirtualWorld(playerid, NPCInfo[i][nWorld]);
			//=====//
            switch(NPCInfo[i][nType])
            {
                case NPC_TYPE_BUS_1: {
                    PutPlayerInVehicle(playerid, BotBus, 0);
                }
                case NPC_TYPE_BUS_2: {
                    PutPlayerInVehicle(playerid, BotBus2, 0);
                }
                case NPC_TYPE_TRAIN: {
                    PutPlayerInVehicle(playerid, BotTrain, 0);
                }
            }
        }
	}
    else
    {
        SpawnPlayer(playerid);
        if(GetPVarInt(playerid, "PlayerLogged") == 1) return SpawnPlayer(playerid);
		ClearChatbox(playerid, 50);
		CheckIfBanned(playerid);
		//==============================//
		TogglePlayerSpectating(playerid, 1);
	    //==============================//
	    TextDrawShowForPlayer(playerid, SideBar1);
	    TextDrawShowForPlayer(playerid, SideBar2);
	    //==============================//
		CheckAccount(playerid, 1);
	    //==============================//
	    SetTimerEx("LoginCamera", 500, false, "i", playerid);
	    //==============================//
    }
	return 1;
}
Reply
#4

What's above that?
Код:
public OnPlayerRequestClass(playerid, classid)
Is that line: 4?
Reply
#5

Quote:
Originally Posted by Stinged
Посмотреть сообщение
What's above that?
Код:
public OnPlayerRequestClass(playerid, classid)
Is that line: 4?
yea it is
Reply
#6

What's above that?
Reply
#7

Quote:
Originally Posted by Stinged
Посмотреть сообщение
What's above that?
PHP код:
//============================================//
//=====[ ACC USAGE SECTION ]=====//
//============================================// 
@FuNkYTheGreat not working
Reply
#8

use this at start
#include <a_samp>
Reply
#9

Quote:
Originally Posted by FuNkYTheGreat
Посмотреть сообщение
use this at start
#include <a_samp>
Of course I have it from the main script.
Reply
#10

You're #including that?
If so, what do you have above the #include line? (Post more than a few lines)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)