Help with my gamemode.
#1

Hey, i have a problem but i dont know how to fix it, i have an error if i want to compilte and here it is.


PHP код:
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(411) : error 001: expected token: "#endif", but found "-end of file-"
Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase
1 Error
. 
Help please.
O and i dont have the 411 row, sorry i am a beginner.
Reply
#2

Might wanna show us line 400 to line 411 so we can fix it for ya?
Reply
#3

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
Might wanna show us line 400 to line 411 so we can fix it for ya?
Wrong.

Before the callback OnGamemodeInit you must add this:

PHP код:
#endif 
Reply
#4

Yeah it would be something like this
#include <a_samp>
...................
.................
............
#endif
OnGameModeInIt();
Reply
#5

James, i dont quite understand where do i add it. Here is the scipt to GamemodeInt

PHP код:
#include <a_samp>
#include <YSI\y_ini>
#include <foreach>
#include <sscanf2>
#include <zcmd>
native WP_Hash(buffer[], len, const str[]);
#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4
#define PATH "/Players/%s.ini"
#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
#define COLOR_GREEN  0x33AA33AA
#define COLOR_WHITE 0xFFFFFFFF
#if defined PhoenixCarSystem
enum pInfo
{
    
pPass[129],
    
pCash,
    
pAdmin,
    
pKills,
    
pDeaths
}
new 
PlayerInfo[MAX_PLAYERS][pInfo];
new 
pickup;
forward LoadUser_data(playerid,name[],value[]);
public 
LoadUser_data(playerid,name[],value[])
{
    
INI_String("Password",PlayerInfo[playerid][pPass], 129);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    
INI_Int("Kills",PlayerInfo[playerid][pKills]);
    
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 
1;
}
stock UserPath(playerid)
{
    new 
string[128],playername[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,playername,sizeof(playername));
    
format(string,sizeof(string),PATH,playername);
    return 
string;
}
public 
OnGameModeInit()
{
        
SetGameModeText("Nebulos FUN V1");
        
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
        
//----------------------Pickupid-----------------------------//
        
pickup = CreatePickup(1316,1,2454.2390,1499.2466,11.5618,0);
        
//----------------------Masinad------------------------------//
        
AddStaticVehicle(444,2039.9304,1319.6042,11.0432,179.5908,20,91); //
        
AddStaticVehicle(562,2039.9293,1335.2542,10.3314,180.3404,59,80); //
        
AddStaticVehicle(407,2040.1682,1364.6359,10.9093,181.5008,57,56); //
        
return 1;
} 
Reply
#6

Replace it with this:

PHP код:
#include <a_samp>
#include <YSI\y_ini>
#include <foreach>
#include <sscanf2>
#include <zcmd>

native WP_Hash(buffer[], len, const str[]);

#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4

#define PATH "/Players/%s.ini"

#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
#define COLOR_GREEN  0x33AA33AA
#define COLOR_WHITE 0xFFFFFFFF

#if defined PhoenixCarSystem

enum pInfo
{
    
pPass[129],
    
pCash,
    
pAdmin,
    
pKills,
    
pDeaths
}
new 
PlayerInfo[MAX_PLAYERS][pInfo];

new 
pickup;

forward LoadUser_data(playerid,name[],value[]);
public 
LoadUser_data(playerid,name[],value[])
{
    
INI_String("Password",PlayerInfo[playerid][pPass], 129);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    
INI_Int("Kills",PlayerInfo[playerid][pKills]);
    
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 
1;
}

stock UserPath(playerid)
{
    new 
string[128],playername[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,playername,sizeof(playername));
    
format(string,sizeof(string),PATH,playername);
    return 
string;
}
#endif
public OnGameModeInit()
{
        
SetGameModeText("Nebulos FUN V1");
        
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
        
//----------------------Pickupid-----------------------------//
        
pickup = CreatePickup(1316,1,2454.2390,1499.2466,11.5618,0);
        
//----------------------Masinad------------------------------//
        
AddStaticVehicle(444,2039.9304,1319.6042,11.0432,179.5908,20,91); //
        
AddStaticVehicle(562,2039.9293,1335.2542,10.3314,180.3404,59,80); //
        
AddStaticVehicle(407,2040.1682,1364.6359,10.9093,181.5008,57,56); //
        
return 1;
} 
Reply
#7

Now theres a whole new line of errors :S

PHP код:
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(61) : error 017: undefined symbol "pickup"
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(84) : error 017: undefined symbol "UserPath"
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(86) : error 017: undefined symbol "UserPath"
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(98) : error 017: undefined symbol "UserPath"
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(101) : error 017: undefined symbol "PlayerInfo"
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(101) : warning 215: expression has no effect
C
:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(101) : error 001: expected token: ";", but found "]"
C:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(101) : error 029: invalid expression, assumed zero
C
:\Users\ilmar\Desktop\Nebulos FUN\gamemodes\NebulosFUN.pwn(101) : fatal error 107: too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase
8 Errors
. 
Reply
#8

Quote:
Originally Posted by gtakillerIV
Посмотреть сообщение
Might wanna show us line 400 to line 411 so we can fix it for ya?
Well...

PHP код:
                    ShowPlayerDialog(playerid, DIALOG_LOGIN, DIALOG_STYLE_PASSWORD,""COL_WHITE"Sisselogimine",""COL_RED"Oled sisestanud vale parooli.\n"COL_WHITE"Kirjuta oma password alla, et sisse logida.","Sisene","Lahku");
                }
                
            }
        }
    }
    return 
1;
}
public 
OnPlayerClickPlayer(playerid, clickedplayerid, source)
{
        return 
1;
} 
The error line is 413 now
Reply
#9

PHP код:
#include <a_samp>
#include <YSI\y_ini>
#include <foreach>
#include <sscanf2>
#include <zcmd>

#if defined FILTERSCRIPT

public OnFilterScriptInit()
{
    print(
"\n--------------------------------------");
    print(
" Blank Filterscript by your name here");
    print(
"--------------------------------------\n");
    return 
1;
}

public 
OnFilterScriptExit()
{
    return 
1;
}

#else

main()
{
    print(
"\n----------------------------------");
    print(
" Blank Gamemode by your name here");
    print(
"----------------------------------\n");
}

native WP_Hash(buffer[], len, const str[]);

#define DIALOG_REGISTER 1
#define DIALOG_LOGIN 2
#define DIALOG_SUCCESS_1 3
#define DIALOG_SUCCESS_2 4

#define PATH "/Players/%s.ini"

#define COL_WHITE "{FFFFFF}"
#define COL_RED "{F81414}"
#define COL_GREEN "{00FF22}"
#define COL_LIGHTBLUE "{00CED1}"
#define COLOR_GREEN  0x33AA33AA
#define COLOR_WHITE 0xFFFFFFFF

#if defined PhoenixCarSystem

enum pInfo
{
    
pPass[129],
    
pCash,
    
pAdmin,
    
pKills,
    
pDeaths
}
new 
PlayerInfo[MAX_PLAYERS][pInfo];

new 
pickup;

forward LoadUser_data(playerid,name[],value[]);
public 
LoadUser_data(playerid,name[],value[])
{
    
INI_String("Password",PlayerInfo[playerid][pPass], 129);
    
INI_Int("Cash",PlayerInfo[playerid][pCash]);
    
INI_Int("Admin",PlayerInfo[playerid][pAdmin]);
    
INI_Int("Kills",PlayerInfo[playerid][pKills]);
    
INI_Int("Deaths",PlayerInfo[playerid][pDeaths]);
    return 
1;
}

stock UserPath(playerid)
{
    new 
string[128],playername[MAX_PLAYER_NAME];
    
GetPlayerName(playerid,playername,sizeof(playername));
    
format(string,sizeof(string),PATH,playername);
    return 
string;
}
#endif
public OnGameModeInit()
{
        
SetGameModeText("Nebulos FUN V1");
        
AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
        
//----------------------Pickupid-----------------------------//
        
pickup = CreatePickup(1316,1,2454.2390,1499.2466,11.5618,0);
        
//----------------------Masinad------------------------------//
        
AddStaticVehicle(444,2039.9304,1319.6042,11.0432,179.5908,20,91); //
        
AddStaticVehicle(562,2039.9293,1335.2542,10.3314,180.3404,59,80); //
        
AddStaticVehicle(407,2040.1682,1364.6359,10.9093,181.5008,57,56); //
        
return 1;
} 
Reply
#10

Now i have there errors too ....

PHP код:
C:\Users\ilmar\Desktop\NebulosFUN.pwn(85) : error 017: undefined symbol "pickup"
C:\Users\ilmar\Desktop\NebulosFUN.pwn(108) : error 017: undefined symbol "UserPath"
C:\Users\ilmar\Desktop\NebulosFUN.pwn(110) : error 017: undefined symbol "UserPath"
C:\Users\ilmar\Desktop\NebulosFUN.pwn(122) : error 017: undefined symbol "UserPath"
C:\Users\ilmar\Desktop\NebulosFUN.pwn(125) : error 017: undefined symbol "PlayerInfo"
C:\Users\ilmar\Desktop\NebulosFUN.pwn(125) : warning 215: expression has no effect
C
:\Users\ilmar\Desktop\NebulosFUN.pwn(125) : error 001: expected token: ";", but found "]"
C:\Users\ilmar\Desktop\NebulosFUN.pwn(125) : error 029: invalid expression, assumed zero
C
:\Users\ilmar\Desktop\NebulosFUN.pwn(125) : fatal error 107: too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c) 1997-2006, ITB CompuPhase
8 Errors
. 
Reply


Forum Jump:


Users browsing this thread: