SA-MP Forums Archive
Need help =(( - 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: Need help =(( (/showthread.php?tid=279715)



Need help =(( - antonio600x - 28.08.2011

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


Re: Need help =(( - [MG]Dimi - 28.08.2011

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... 



Re: Need help =(( - antonio600x - 28.08.2011

Код:
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



Re: Need help =(( - Markx - 28.08.2011

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.


Re: Need help =(( - antonio600x - 28.08.2011

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.



Re: Need help =(( - [MG]Dimi - 28.08.2011

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.