undefined symbol
#1

Код:
C:\Users\ii\Desktop\New Folder (5)\gamemodes\roleplay.pwn(25790) : error 017: undefined symbol "text1"
Код:
public ViewPlayer(extraid, name[])
{
        if (GetFactionType(extraid) != FACTION_POLICE)
            return 0;
        SendClientMessageEx(extraid, COLOR_GREEN, "------------------------_POLICE DATABASE_----------------------");
        SendClientMessageEx(extraid, COLOR_GREEN, "Logged in as %s", ReturnName(extraid, 1));
        SendClientMessageEx(extraid, COLOR_GREEN, "------------------------_POLICE DATABASE_-----------------------");
        if(PlayerData[extraid][pDrivingTest] == 0) { text1 = "Not Passed"; }
        new text1[20];
		SendClientMessageEx(extraid, COLOR_WHITE, "------------------------_PERSON CHECK_----------------------");
        SendClientMessageEx(extraid, COLOR_WHITE, "Name: %s", ReturnName(PlayerData[extraid][pMDCPlayer], 1));
        SendClientMessageEx(extraid, COLOR_WHITE, "Date Of Birth: %s", PlayerData[PlayerData[extraid][pMDCPlayer]][pBirthdate]);
        SendClientMessageEx(extraid, COLOR_WHITE, "Time in Los Santos: %d", PlayerData[PlayerData[extraid][pMDCPlayer]][pPlayingHours]);
        SendClientMessageEx(extraid, COLOR_WHITE, "Phone Number: %s", PlayerData[PlayerData[extraid][pMDCPlayer]][pPhone]);
        SendClientMessageEx(extraid, COLOR_WHITE, "---------------------------------------------------------------");
        return 1;
}
Reply
#2

pawn Код:
if(PlayerData[extraid][pDrivingTest] == 0) { text1 = "Not Passed"; }
new text1[20];
that's why, you have defined the variable after using it, you need to define it before using it anywhere:
pawn Код:
new text1[20];
if(PlayerData[extraid][pDrivingTest] == 0) { text1 = "Not Passed"; }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)