SA-MP Forums Archive
Some errors - 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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Some errors (/showthread.php?tid=212671)



Some errors - antsolen - 17.01.2011

Код:
C:\Documents and Settings\Andero\Desktop\Stunting Life\filterscripts\ladmin4v2.pwn(793) : warning 217: loose indentation
C:\Documents and Settings\Andero\Desktop\Stunting Life\filterscripts\ladmin4v2.pwn(818) : warning 217: loose indentation
C:\Documents and Settings\Andero\Desktop\Stunting Life\filterscripts\ladmin4v2.pwn(897) : error 017: undefined symbol "DIALOG_STYLE"
C:\Documents and Settings\Andero\Desktop\Stunting Life\filterscripts\ladmin4v2.pwn(897) : error 017: undefined symbol "_INPUT"
C:\Documents and Settings\Andero\Desktop\Stunting Life\filterscripts\ladmin4v2.pwn(897) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Andero\Desktop\Stunting Life\filterscripts\ladmin4v2.pwn(897) : fatal error 107: too many error messages on one line

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


4 Errors.
Line 897
Код:
ShowPlayerDialog(playerid,DIALOGID0+2,DIALOG_STYLE _INPUT,"Login Account",lstring,"Login","Quit");
all
Код:
public OnPlayerSpawn(playerid)
{
if(ServerInfo[Locked] == 1 && PlayerInfo[playerid][AllowedIn] == false)
{
GameTextForPlayer(playerid,"~r~Server Locked~n~You must enter password before spawning~n~/password <password>",4000,3);
SetTimerEx("DelayKillPlayer", 2500,0,"d",playerid);
return 1;
}

if(ServerInfo[MustLogin] == 1 && PlayerInfo[playerid][Registered] == 1 && PlayerInfo[playerid][LoggedIn] == 0)
{
#if USE_DIALOGS == true
new lstring[256];
format(lstring,256,"That account '%s 'is not login please login!:",pName(playerid));
ShowPlayerDialog(playerid,DIALOGID0+2,DIALOG_STYLE _INPUT,"Login Account",lstring,"Login","Quit");
#endif
return 1;
}

if(ServerInfo[MustRegister] == 1 && PlayerInfo[playerid][Registered] == 0)
{

new lstring[256];
format(lstring,256,"That account '%s 'is not register!\n\n Register to access your Account:",pName(playerid));
ShowPlayerDialog(playerid,DIALOGID0+1,DIALOG_STYLE _INPUT,"Register Account",lstring,"Register","Quit");
return 1;
}

PlayerInfo[playerid][Spawned] = 1;

if(PlayerInfo[playerid][Frozen] == 1) {
TogglePlayerControllable(playerid,false); return SendClientMessage(playerid,red,"You cant escape your punishment. You Are Still Frozen");
}

if(PlayerInfo[playerid][Jailed] == 1) {
SetTimerEx("JailPlayer",3000,0,"d",playerid); return SendClientMessage(playerid,red,"You cant escape your punishment. You Are Still In Jail");
}

if(ServerInfo[AdminOnlySkins] == 1) {
if( (GetPlayerSkin(playerid) == ServerInfo[AdminSkin]) || (GetPlayerSkin(playerid) == ServerInfo[AdminSkin2]) ) {
if(PlayerInfo[playerid][Level] >= 1)
GameTextForPlayer(playerid,"~b~Welcome~n~~w~Admin" ,3000,1);
else {
GameTextForPlayer(playerid,"~r~This Skin Is For~n~Administrators~n~Only",4000,1);
SetTimerEx("DelayKillPlayer", 2500,0,"d",playerid);
return 1;
}
}
}

if((dUserINT(PlayerName2(playerid)).("UseSkin")) == 1)
if((PlayerInfo[playerid][Level] >= 1) && (PlayerInfo[playerid][LoggedIn] == 1))
SetPlayerSkin(playerid,(dUserINT(PlayerName2(playe rid)).("FavSkin")) );

if(ServerInfo[GiveWeap] == 1) {
if(PlayerInfo[playerid][LoggedIn] == 1) {
PlayerInfo[playerid][TimesSpawned]++;
if(PlayerInfo[playerid][TimesSpawned] == 1)
{
GivePlayerWeapon(playerid, dUserINT(PlayerName2(playerid)).("weap1"), dUserINT(PlayerName2(playerid)).("weap1ammo") );
GivePlayerWeapon(playerid, dUserINT(PlayerName2(playerid)).("weap2"), dUserINT(PlayerName2(playerid)).("weap2ammo") );
GivePlayerWeapon(playerid, dUserINT(PlayerName2(playerid)).("weap3"), dUserINT(PlayerName2(playerid)).("weap3ammo") );
GivePlayerWeapon(playerid, dUserINT(PlayerName2(playerid)).("weap4"), dUserINT(PlayerName2(playerid)).("weap4ammo") );
GivePlayerWeapon(playerid, dUserINT(PlayerName2(playerid)).("weap5"), dUserINT(PlayerName2(playerid)).("weap5ammo") );
GivePlayerWeapon(playerid, dUserINT(PlayerName2(playerid)).("weap6"), dUserINT(PlayerName2(playerid)).("weap6ammo") );
}
}
}
return 1;
}
Thats ladmin script


Re: Some errors - Alex_Valde - 17.01.2011

Try this:
pawn Код:
ShowPlayerDialog(playerid,DIALOGID0+2,DIALOG_STYLE_INPUT,"Login Account",lstring,"Login","Quit");



Re: Some errors - SmugglesJr - 17.01.2011

Yeah what you did wrong at this part DIALOG_STYLE _INPUT was you put a space after STYLE then _ :P


Re: Some errors - Not available - 17.01.2011

/\
|| Postcount much.

You should intend your code and add some else if(). If multiple funds are find, you don't want it to argue.
(Edit: I did not notice the returns, my bad. Anyways intend your code and you are good.)


Re: Some errors - Calgon - 17.01.2011

Quote:
Originally Posted by Not available
Посмотреть сообщение
/\
|| Postcount much.

You should intend your code and add some else if(). If multiple funds are find, you don't want it to argue.
(Edit: I did not notice the returns, my bad. Anyways intend your code and you are good.)
The same thing applies to you.

Quote:
Originally Posted by Your Signature
Do not answer to help requests, unless you know what you are talking about.
Did you not mean indent?


Re: Some errors - Mike_Peterson - 17.01.2011

Are we going to argue about this? solving answer has been giving. no need for any further posts... -.-


Re: Some errors - Hal - 17.01.2011

Quote:
Originally Posted by SmugglesJr
Посмотреть сообщение
Yeah what you did wrong at this part DIALOG_STYLE _INPUT was you put a space after STYLE then _ :P
Quote:
Originally Posted by Not available
Посмотреть сообщение
/\
|| Postcount much.

You should intend your code and add some else if(). If multiple funds are find, you don't want it to argue.
(Edit: I did not notice the returns, my bad. Anyways intend your code and you are good.)
No, its better that the user understands what they did wrong, because most people just take the code and paste it in w/o looking to see what they did wrong.


Re: Some errors - antsolen - 17.01.2011

Got a new errors
Код:
C:\Documents and Settings\Andero\Desktop\Stunting Life\filterscripts\ladmin4v2.pwn(793) : warning 217: loose indentation
C:\Documents and Settings\Andero\Desktop\Stunting Life\filterscripts\ladmin4v2.pwn(818) : warning 217: loose indentation
C:\Documents and Settings\Andero\Desktop\Stunting Life\filterscripts\ladmin4v2.pwn(935) : error 017: undefined symbol "player"
C:\Documents and Settings\Andero\Desktop\Stunting Life\filterscripts\ladmin4v2.pwn(935) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Andero\Desktop\Stunting Life\filterscripts\ladmin4v2.pwn(935) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Andero\Desktop\Stunting Life\filterscripts\ladmin4v2.pwn(935) : fatal error 107: too many error messages on one line

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


4 Errors.
some help ?



EDIT : SORRY FOR THAT STUPID ANSWER FIXED IT IM BEGGINER


Re: Some errors - Alex_Valde - 17.01.2011

And the lines are...? (935)


Re: Some errors - Not available - 17.01.2011

Quote:

error 017: undefined symbol "player"

You are attempting to call a variable that's not defined.

More I can not say before you post the affected lines.