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



Need some help with this. - Flake. - 22.02.2010

hey im making this code

Код:
if(strcmp(cmdtext, "/about", true) == 0)
	{
	ShowPlayerDialog(playerid,1,0,"Information center",	"Info Center \n The objective in this server is to help your team take over turf \n if you win the turf war you will receve a rocket launcher and 50000 \n you can view your commands buy typing /help and /commands \n if you have seen a cheater/rule breaker use /report [ID] [REASON] \n you can anso turn on thr SAM site missile launchers neer A51 by going need them and typing /firesam [ID] \n if you are having trouble with somthing or have seen a bug please tell a admin by tyoing /admins \n if you want to view the info about turf wars simply use /turfinfo","Ok","Cancel");
  return 1;
	}
but i get these errors :< any help?
Код:
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1284) : error 075: input line too long (after substitutions)
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1285) : error 037: invalid string (possibly non-terminated string)
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1285) : warning 215: expression has no effect
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1285) : error 001: expected token: ";", but found "-identifier-"
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1285) : error 017: undefined symbol "Center"
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1285) : fatal error 107: too many error messages on one line

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


5 Errors.



Re: Need some help with this. - Flake. - 22.02.2010

*Bump* anyone?


Re: Need some help with this. - dice7 - 22.02.2010

Pawn has limitations to how long a single line can be

Try this
pawn Код:
ShowPlayerDialog(playerid,1,0,"Information center", "Info Center \n The objective in this server is to help your team take over turf \
 \n if you win the turf war you will receve a rocket launcher and 50000 \n you can view your commands buy typing /help and \
/commands \n if you have seen a cheater/rule breaker use /report [ID] [REASON] \n you can anso turn on thr SAM site missile \
launchers neer A51 by going need them and typing /firesam [ID] \n if you are having trouble with somthing or have seen a bug \
please tell a admin by tyoing /admins \n if you want to view the info about turf wars simply use /turfinfo"
,"Ok","Cancel");



Re: Need some help with this. - smeti - 22.02.2010

pawn Код:
if(strcmp(cmdtext, "/about", true) == 0)
    {
        new info[] = {"Info Center \n The objective in this server is to help your team take over turf \n if you win the turf war you will receve a rocket launcher and 50000 \n you can view your commands buy typing /help and /commands" },
            info1[] = {" \n if you have seen a cheater/rule breaker use /report [ID] [REASON] \n you can anso turn on thr SAM site missile launchers neer A51 by going need them and typing /firesam [ID]" },
            info2[] = {" \n if you are having trouble with somthing or have seen a bug please tell a admin by tyoing /admins\n if you want to view the info about turf wars simply use /turfinfo" },
            string[1024];
        format(string, sizeof string,"%s%s%s", info, info1, info2);
        ShowPlayerDialog(playerid, 40, 0, "Information center", string, "Ok", "Cancel");
        return 1;
    }



Re: Need some help with this. - Flake. - 22.02.2010

this works thanks but

Код:
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1288) : warning 219: local variable "string" shadows a variable at a preceding level
Line 1288:
Код:
string[1024];



Re: Need some help with this. - smeti - 22.02.2010

Quote:
Originally Posted by (*|Flake|*)
this works thanks but

Код:
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1288) : warning 219: local variable "string" shadows a variable at a preceding level
Line 1288:
Код:
string[1024];
new string[1024]; removed!!!!!!!!!! /delete new variable: new blablabla[1024];

pawn Код:
if(strcmp(cmdtext, "/about", true) == 0)
    {
        new
            info[] = {"Info Center \n The objective in this server is to help your team take over turf \n if you win the turf war you will receve a rocket launcher and 50000 \n you can view your commands buy typing /help and /commands" },
            info1[] = {" \n if you have seen a cheater/rule breaker use /report [ID] [REASON] \n you can anso turn on thr SAM site missile launchers neer A51 by going need them and typing /firesam [ID]" },
            info2[] = {" \n if you are having trouble with somthing or have seen a bug please tell a admin by tyoing /admins\n if you want to view the info about turf wars simply use /turfinfo" },
            blablabla[1024];
        format(blablabla, sizeof blablabla,"%s%s%s", info, info1, info2);
        ShowPlayerDialog(playerid, 40, 0, "Information center", blablabla, "Ok", "Cancel");
        return 1;
    }



Re: Need some help with this. - Flake. - 22.02.2010

Quote:
Originally Posted by Phento
Quote:
Originally Posted by (*|Flake|*)
this works thanks but

Код:
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1288) : warning 219: local variable "string" shadows a variable at a preceding level
Line 1288:
Код:
string[1024];
pawn Код:
new string[1024]; remove new blablabla[1024];
pawn Код:
if(strcmp(cmdtext, "/about", true) == 0)
    {
        new info[] = {"Info Center \n The objective in this server is to help your team take over turf \n if you win the turf war you will receve a rocket launcher and 50000 \n you can view your commands buy typing /help and /commands" },
            info1[] = {" \n if you have seen a cheater/rule breaker use /report [ID] [REASON] \n you can anso turn on thr SAM site missile launchers neer A51 by going need them and typing /firesam [ID]" },
            info2[] = {" \n if you are having trouble with somthing or have seen a bug please tell a admin by tyoing /admins\n if you want to view the info about turf wars simply use /turfinfo" },
            blablabla[1024];
        format(blablabla, sizeof blablabla,"%s%s%s", info, info1, info2);
        ShowPlayerDialog(playerid, 40, 0, "Information center", blablabla, "Ok", "Cancel");
        return 1;
    }
Код:
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1286) : warning 219: local variable "string" shadows a variable at a preceding level
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1286) : error 017: undefined symbol "remove"
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1286) : warning 215: expression has no effect
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1286) : error 001: expected token: ";", but found "new"
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1290) : error 021: symbol already defined: "blablabla"
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1286) : warning 204: symbol is assigned a value that is never used: "blablabla"
C:\Users\ELLIOT\Desktop\Cod-Sa v1.4a\gamemodes\lvdm.pwn(1286) : warning 204: symbol is assigned a value that is never used: "string"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


3 Errors.



Re: Need some help with this. - Flake. - 22.02.2010

Thanks for your help guys
i fixed it