Need help =((
#1

I need r help, Sorry to be boring.
Please fix this error =) :beer:
Stupid that error

http://www.2shared.com/file/pVAQfhfX/gmbeta.html

Sry for bad english
Reply
#2

Next time copy/paste your code.
Here is error that you did
PHP код:
public OnPlayerDisconnect(playeridreason)
{
    new 
name[MAX_PLAYER_NAME], file[256];
    
GetPlayerName(playeridnamesizeof(name));
    
format(filesizeof(file), SERVER_USER_FILEname);
    if(
gPlayerLogged[playerid] == 1)
    {
        
dini_IntSet(file"Score"PlayerInfo[playerid][pScore]);
        
dini_IntSet(file"Cash"PlayerInfo[playerid][pCash]);
        
dini_IntSet(file"AdminLevel",PlayerInfo[playerid][pAdminLevel]);
    }
    
gPlayerLogged[playerid] = 0;
}
return 
1;
public 
OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
if (
dialogid == 1)
    {
        new 
name[MAX_PLAYER_NAME], file[256], string[128];
        
GetPlayerName... 
in OnPlayerDisconnect callback you closed callback and then added return 1. It should be like this:

PHP код:
public OnPlayerDisconnect(playeridreason)
{
    new 
name[MAX_PLAYER_NAME], file[256];
    
GetPlayerName(playeridnamesizeof(name));
    
format(filesizeof(file), SERVER_USER_FILEname);
    if(
gPlayerLogged[playerid] == 1)
    {
        
dini_IntSet(file"Score"PlayerInfo[playerid][pScore]);
        
dini_IntSet(file"Cash"PlayerInfo[playerid][pCash]);
        
dini_IntSet(file"AdminLevel",PlayerInfo[playerid][pAdminLevel]);
    }
    
gPlayerLogged[playerid] = 0;
    return 
1//[MG]DIMI: THIS SHOULD BE UP
// [MG]DIMI: AND THIS ONE DOWN
public OnDialogResponse(playeriddialogidresponselistiteminputtext[])
{
if (
dialogid == 1)
    {
        new 
name[MAX_PLAYER_NAME], file[256], string[128];
        
GetPlayerName... 
Reply
#3

Код:
public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[])
{
if (dialogid == 1)
        {
        new name[MAX_PLAYER_NAME], file[256], string[128];
** * * *GetPlayerName(playerid, name, sizeof(name));
** * * *format(file, sizeof(file), SERVER_USER_FILE, name);
** * * *if(!response) return Kick(playerid);
** * * *if (!strlen(inputtext)) return ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "LOGIN", "Dobrodosli, vi ste registrirani.Unesite vasu sifru da se logirate", "Login", "Izlaz");
** * * *new tmp;
** * * *tmp = dini_Int(file, "Password");
** * * *if(udb_hash(inputtext) != tmp) {
** * * * * *SendClientMessage(playerid, COLOR_RED, "Pogresna lozinka!");
** * * * * *ShowPlayerDialog(playerid, 2, DIALOG_STYLE_INPUT, "LOGIN", "Dobrodosli, vi ste registrirani.Unesite vasu sifru da se logirate", "Login", "Izlaz");
** * * *}
** * * *else
** * * *{
** * * * * *gPlayerLogged[playerid] = 1;
** * * * * *PlayerInfo[playerid][pAdminLevel] = dini_Int(file, "AdminLevel");
** * * * * *SetPlayerScore(playerid, PlayerInfo[playerid][pScore]);
** * * * * *GivePlayerMoney(playerid, dini_Int(file, "Money")-GetPlayerMoney(playerid));
** * * * * *SendClientMessage(playerid,COLOR_WHITE, "SERVER:Logirani ste!!");
** * * *}
** *}
***return 1;
}

Код:
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(132) : warning 217: loose indentation
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(132) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(132) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(132) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(132) : fatal error 107: too many error messages on one line
Reply
#4

You cannot put those '*' infront of the functions, use TAB and space to line it up like it should be.

You should take a look on SAMP Wiki wich would help you much.
Reply
#5

Quote:
Originally Posted by Markx
Посмотреть сообщение
You cannot put those '*' infront of the functions, use TAB and space to line it up like it should be.

You should take a look on SAMP Wiki wich would help you much.
Код:
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(132) : warning 217: loose indentation
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(132) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(132) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(132) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Administrator\Desktop\SAMP SERVER\gamemodes\gmbeta.pwn(132) : fatal error 107: too many error messages on one line

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


4 Errors.
Reply
#6

Quote:
Originally Posted by Markx
Посмотреть сообщение
You cannot put those '*' infront of the functions, use TAB and space to line it up like it should be.

You should take a look on SAMP Wiki wich would help you much.
That's forums bug. It added them into my code also. I simply deleted them. That bug showed up today.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)