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



Help - Bojaa - 05.04.2017

I have this cmd But it have some errors Can it be fixed?
PHP код:
CMD:skills(playeridparams[])
{
        new 
jaber[48*12], level PlayerInfo[playerid][pDetSkill];
        new 
levelt PlayerInfo[playerid][pTruckSkill];
        new 
levell PlayerInfo[playerid][pLawSkill];
        new 
levels PlayerInfo[playerid][pSexSkill];
        new 
leveld PlayerInfo[playerid][pDrugsSkill];
        new 
levelsm PlayerInfo[playerid][pSmugSkill];
        new 
levelar PlayerInfo[playerid][pArmsSkill];
        new 
levelmch PlayerInfo[playerid][pMechSkill];
        new 
levelb PlayerInfo[playerid][pBoxSkill];
        new 
levelf PlayerInfo[playerid][pFishSkill]
        if(
level >= && level <= 50 levels 1// this will show that players detective level is 1
        
format(jaber,sizeof(jaber),"Detective Level: 1 - (%d  more times to level up)\nTrucker Level: 1 - (%d  more times to level up)\nLawyer Level: 1 - (%d  more times to level up)\nWhore Level: 1 - (%d  more times to level up)\nDrug Dealer Level: 1 - (%d  more times to level up)\nDrug Smuggler Level: 1 - (%d  more times to level up)\nArms Dealer Level: 1 - (%d  more times to level up)\nCar Mechanic Level: 1 - (%d  more times to level up)\nBoxer Level: 1 - (%d  more times to level up)\nFisher Level: 1 - (%d  more times to level up)",
        
51 level,51 levelt,51 levell,51 levels,51 leveld,51 levelsm,51 levelar,51 levelmch,51 levelb,51 levelf);
        
ShowPlayerDialog(playerid,303,DIALOG_STYLE_MSGBOX,"Jobs Level",jaber,"Close","");
        return 
1;

Errors are
PHP код:
D:\RolePaly\gamemodes\yerp.pwn(45733) : error 001expected token";"but found "if"
D:\RolePaly\gamemodes\yerp.pwn(45733) : error 075input line too long (after substitutions)
D:\RolePaly\gamemodes\yerp.pwn(45734) : error 037invalid string (possibly non-terminated string)
D:\RolePaly\gamemodes\yerp.pwn(45734) : error 017undefined symbol "Detective"
D:\RolePaly\gamemodes\yerp.pwn(45734) : error 029invalid expressionassumed zero
D
:\RolePaly\gamemodes\yerp.pwn(45734) : fatal error 107too many error messages on one line
Compilation aborted
.Pawn compiler 3.2.3664              Copyright (c1997-2006ITB CompuPhase
6 Errors




Re: Help - Bwandon - 05.04.2017

Код:
new levelf = PlayerInfo[playerid][pFishSkill];
You missed a ; at the end.


Re: Help - Bojaa - 05.04.2017

Quote:
Originally Posted by Bwandon
Посмотреть сообщение
Код:
new levelf = PlayerInfo[playerid][pFishSkill];
You missed a ; at the end.
and howto fix this
PHP код:
D:\RolePaly\gamemodes\yerp.pwn(45733) : error 075input line too long (after substitutions



Re: Help - DobbysGamertag - 05.04.2017

StrCat(); or Zeex's Compiler Patches


Re: Help - Sew_Sumi - 05.04.2017

Why are you setting them to ONLY level 1, and doing 51 - leveletc...


You can do this much more effectively, and a lot more efficiently than doing it this way.


Re: Help - Bojaa - 05.04.2017

Quote:
Originally Posted by Sew_Sumi
Посмотреть сообщение
Why are you setting them to ONLY level 1, and doing 51 - leveletc...


You can do this much more effectively, and a lot more efficiently than doing it this way.
Okay So How can i fix that,??


Re: Help - Sew_Sumi - 05.04.2017

Using if statements, and looking at ranges of results, rather than hardcoding it to simply say Level 1, would be a start.