string error?
#1

pawn Код:
C:\DOCUME~1\ADMINI~1\Desktop\woodle\GAMEMO~1\ФBА.pwn(1873) : warning 219: local variable "string" shadows a variable at a preceding level
C:\DOCUME~1\ADMINI~1\Desktop\woodle\GAMEMO~1\ФВА.pwn(2056) : warning 219: local variable "string" shadows a variable at a preceding level
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.
Those are my errrors

pawn Код:
if (strcmp("/help", cmdtext, true) == 0)
    {
    #define HELP_DIALOG 5
    new string[1028];
    strcat(string, "{F3FF02}" "dhdfhfdhdfhdfhfd|\n", 1024);
    strcat(string, "{F3FF02}" "dhdfhdfhdfhdfhdfhfdhfd |\n", 1024);
    strcat(string, "{F3FF02}" "dfhfdhfdhfdhfdhdfhfdhfdhfdhdfhdfhfd |\n", 1024);
    strcat(string, "{F3FF02}" "For Rules Type: /rules. For Commands Type: /commands |\n", 1024);
    strcat(string, "{F3FF02}" "dhdfhdfhdfdfhfdhdfhdf |\n", 1024);
    strcat(string, "{F3FF02}" "gdsgdsgfdghdfhfdhdfhdfhdfh|\n", 1024);
    strcat(string, "{F3FF02}" "sfafsafsafsafsafsa, ||", 1024);
    strcat(string, "{F3FF02}" "asfsafasfasfasfasfsafsafasfas ||", 1024);
    strcat(string, "{F3FF02}" "sfsafsafsafsafsaf ||", 1024);
    strcat(string, "{F3FF02}" "sdfghjkl;, ||", 1024);
    strcat(string, "{F3FF02}" "adhgjgfgfgfg", 1024);
    ShowPlayerDialog(playerid,DIALOG_ANIMS,DIALOG_STYLE_MSGBOX,"{FFAF00}" "Menu" "{FFAF00}" "Help", string, "Ok", "Cancel");
    return 1;
    }
thats my command

and when the dialog pops its looks something likes this



How do i fix this?
Reply
#2

Simplest way to fix it would be to rename string to str.
Reply
#3

pawn Код:
C:\DOCUME~1\ADMINI~1\Desktop(2056) : warning 204: symbol is assigned a value that is never used: "string1"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


2 Warnings.
when i rename all of them the command doesnt works.
Reply
#4

Did you rename it in "ShowPlayerDialog" too?
Reply
#5

Now the command works but it looks like
http://imgur.com/g4kwz
D:
Reply
#6

What? You mean that it cuts off?
Reply
#7

yes when i add more lines it just goes out of the screen and looks ugly
Reply
#8

Sorry, I don't really know how to help you with that much, maybe create a new line instead of making one so long?
Reply
#9

there is a new line in script for it
but inside the gamemode it all just shows in 1 line
Reply
#10

You should put "\n" when you want an enter in the sentence shown in game. \n simply stands for an enter.

Jesse
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)