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



Help please :3 - iGetty - 06.07.2011

pawn Код:
LINE : 19697: strins(JFS,"Name: %s(Rank: %d.)\n",strlen(JFS), GetName(i), Player[i][GroupRank]);
                ShowPlayerDialog(playerid, 1234, DIALOG_STYLE_MSGBOX, "{F60000}Welcome Box!",JFS, "Play", "Play");
This is the error:

Код:
C:\Documents and Settings\Callum.CALLUM-3951A231\Desktop\Scripts\VXRP\gamemodes\VortexRoleplay.pwn(19697) : error 035: argument type mismatch (argument 4)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Please can someone help? :3


Re: Help please :3 - HayZatic - 06.07.2011

Quote:
Originally Posted by getty154
Посмотреть сообщение
pawn Код:
LINE : 19697: strins(JFS,"Name: %s(Rank: %d.)\n",strlen(JFS), GetName(i), Player[i][GroupRank]);
                ShowPlayerDialog(playerid, 1234, DIALOG_STYLE_MSGBOX, "{F60000}Welcome Box!",JFS, "Play", "Play");
This is the error:

Код:
C:\Documents and Settings\Callum.CALLUM-3951A231\Desktop\Scripts\VXRP\gamemodes\VortexRoleplay.pwn(19697) : error 035: argument type mismatch (argument 4)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.
Please can someone help? :3
Idk if this will work but try changing

strins to strings


Re: Help please :3 - iGetty - 06.07.2011

Код:
C:\Documents and Settings\Callum.CALLUM-3951A231\Desktop\Scripts\VXRP\gamemodes\VortexRoleplay.pwn(19698) : error 012: invalid function call, not a valid address
C:\Documents and Settings\Callum.CALLUM-3951A231\Desktop\Scripts\VXRP\gamemodes\VortexRoleplay.pwn(19698) : warning 215: expression has no effect
C:\Documents and Settings\Callum.CALLUM-3951A231\Desktop\Scripts\VXRP\gamemodes\VortexRoleplay.pwn(19698) : warning 215: expression has no effect
C:\Documents and Settings\Callum.CALLUM-3951A231\Desktop\Scripts\VXRP\gamemodes\VortexRoleplay.pwn(19698) : warning 215: expression has no effect
C:\Documents and Settings\Callum.CALLUM-3951A231\Desktop\Scripts\VXRP\gamemodes\VortexRoleplay.pwn(19698) : error 001: expected token: ";", but found ")"
C:\Documents and Settings\Callum.CALLUM-3951A231\Desktop\Scripts\VXRP\gamemodes\VortexRoleplay.pwn(19698) : error 029: invalid expression, assumed zero
C:\Documents and Settings\Callum.CALLUM-3951A231\Desktop\Scripts\VXRP\gamemodes\VortexRoleplay.pwn(19698) : fatal error 107: too many error messages on one line

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


4 Errors.
This is the line:

pawn Код:
string(JFS,"Name: %s(Rank: %d.)\n",strlen(JFS), GetName(i), Player[i][GroupRank]);



Re: Help please :3 - HayZatic - 06.07.2011

Show us the whole Command


Re: Help please :3 - iGetty - 06.07.2011

pawn Код:
command(members, playerid, params[])
{
    #pragma unused params
    if(Player[playerid][Group] >= 1)
    {
        new JFS[200];
        new string[200];
        for(new i = 0; i < MAX_PLAYERS; i++)
        {
            if(IsPlayerConnectedEx(i) && Player[i][Group] == Player[playerid][Group] && Player[i][AdminDuty] < 1)
            {
                string(JFS,"Name: %s(Rank: %d.)\n",strlen(JFS), GetName(i), Player[i][GroupRank]);
                ShowPlayerDialog(playerid, 1234, DIALOG_STYLE_MSGBOX, "{F60000}Member Box!",JFS, "Play", "Play");
               
            }
        }

       
    }
    return 1;
}



Re: Help please :3 - HayZatic - 06.07.2011

At The Top Make it Instead of


Код:
command(members, playerid, params[])
To

Код:
COMMAND:members(playerid, params[])



Re: Help please :3 - iGetty - 06.07.2011

That will do nothing, and has done nothing..


Re: Help please :3 - Vince - 06.07.2011

Quote:
Originally Posted by HayZatic
Посмотреть сообщение
Idk if this will work but try changing

strins to strings
Please keep your mouth shut when you don't know what you're talking about. The function strins (string insert) only inserts a substring into another string at a given position.

@the topicstarter: use format instead of strins.


Re: Help please :3 - iGetty - 06.07.2011

So it would be,

pawn Код:
format(JFS,"Name: %s(Rank: %d.)\n",strlen(JFS), GetName(i), Player[i][GroupRank]);
? :3

Код:
C:\Documents and Settings\Callum.CALLUM-3951A231\Desktop\Scripts\VXRP\gamemodes\VortexRoleplay.pwn(19697) : error 035: argument type mismatch (argument 2)
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Help please :3 - Vince - 06.07.2011

pawn Код:
format(JFS, sizeof(JFS), "Name: %s(Rank: %d.)\n", GetName(i), Player[i][GroupRank]);
Edit: No wait, I ripped it out of context... Fixing that.

pawn Код:
if(IsPlayerConnectedEx(i) && Player[i][Group] == Player[playerid][Group] && Player[i][AdminDuty] < 1)
            {
                new
                    tmp[64]; // temporary value to store formatted string

                format(tmp, sizeof(tmp), "Name: %s(Rank: %d.)\n", GetName(i), Player[i][GroupRank]);
                strins(JFS, tmp, strlen(JFS));
                ShowPlayerDialog(playerid, 1234, DIALOG_STYLE_MSGBOX, "{F60000}Member Box!",JFS, "Play", "Play");
               
            }



Re: Help please :3 - HayZatic - 06.07.2011

Quote:

Please keep your mouth shut when you don't know what you're talking about. The function strins (string insert) only inserts a substring into another string at a given position.

Please Keep Your Mouth Shut If You Nothing Good To Say. The Thought was that i was trying to Help.
Hasn't Your Mother Taught You Manners?


Re: Help please :3 - iGetty - 06.07.2011

Worked <3


Re: Help please :3 - Vince - 06.07.2011

@HayZatic: Well, you're just helping him from the shore into the ditch. How's that helpful? You might want to consult some resources first, before trying to give an answer that will only generate even more errors.


Re: Help please :3 - iGetty - 06.07.2011

Quote:
Originally Posted by HayZatic
Посмотреть сообщение
Please Keep Your Mouth Shut If You Nothing Good To Say. The Thought was that i was trying to Help.
Hasn't Your Mother Taught You Manners?
Sorry, agreeing with Vince, you caused me more errors.

Quote:
Originally Posted by Vince
Посмотреть сообщение
@HayZatic: Well, you're just helping him from the shore into the ditch. How's that helpful? You might want to consult some resources first, before trying to give an answer that will only generate even more errors.
But mate, when I do this, and I get the thing up, it only shows one name :3, out of like, lots, how can I fix it? :3