SA-MP Forums Archive
again ? why "reps" - 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: again ? why "reps" (/showthread.php?tid=507722)



again ? why "reps" - UfsDev - 18.04.2014

Код:
C:\Users\Khan\Ufs\gamemodes\Freeroam.pwn(4239) : error 010: invalid function or declaration
C:\Users\Khan\Ufs\gamemodes\Freeroam.pwn(4241) : error 010: invalid function or declaration
C:\Users\Khan\Ufs\gamemodes\Freeroam.pwn(4248) : error 010: invalid function or declaration
C:\Users\Khan\Ufs\gamemodes\Freeroam.pwn(4909) : warning 225: unreachable code
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.
Код HTML:
        if(IsPlayerConnected(playerid))
        {
            strcat(string, "{FF0000}Player:{FFFFFF} /O = Body objects  /Skin = Change your skin  /kill = suicide  /Pm {id} {message}  /mycolor = change your color\n/Ptele {ID}  /Top5\n\n");
            strcat(string, "{FFFFFF} /Teles = important teleport  /Teleports = Many Teleports + Cities\n\n");
            strcat(string, "{FFFFFF} /Car [name/id]  /V = Vehicles List  Press 'HORN' button to fix car\n\n");
            strcat(string, "{FFFFFF} /Admins = Show online admins\n\n");
            ShowPlayerDialog(playerid, DIALOG_DCMDS, DIALOG_STYLE_MSGBOX, "{FFFF00}StuntNoobZ - Rules!",string,"Okay","");
            return 1;
        }
ERROR!!! PLZ Fix +REP


Re: again ? why "reps" - HotStyle - 18.04.2014

hey dude, here's

Код:
new rules[900],string[900];

format(rules, sizeof(rules),"Your Text 1!\n");strcat(string,rules);  // their lines.
format(rules, sizeof(rules),"Your Text 2!\n");strcat(string,rules);  // and so will just add more lines
ShowPlayerDialog(playerid, DIALOG_DCMDS, DIALOG_STYLE_MSGBOX, "{FFFF00}StuntNoobZ - Rules!",string,"Okay","");



Re: again ? why "reps" - MattTucker - 18.04.2014

Quote:
Originally Posted by HotStyle
Посмотреть сообщение
hey dude, here's

Код:
new rules[900],string[900];

format(rules, sizeof(rules),"Your Text 1!");strcat(string,rules);  // their lines.
format(rules, sizeof(rules),"Your Text 2!");strcat(string,rules);  // and so will just add more lines
ShowPlayerDialog(playerid, DIALOG_DCMDS, DIALOG_STYLE_MSGBOX, "{FFFF00}StuntNoobZ - Rules!",string,"Okay","");
I believe you used the strcat in a wrong method as the maxlength is missing + why even use it when you already had use format?


Re: again ? why "reps" - HotStyle - 18.04.2014

I have a dialog so and it works.

Observation: i just forgot to put "\n" on end of text to create a new line.