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)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Help (/showthread.php?tid=265180)



Help - juraska - 29.06.2011

Hi, have i litle problem
Код:
COMMAND:heal(playerid, params[])
{
new PID;
if( sscanf( params,"u",PID ) )
return ShowPlayerDialog(playerid, Error_Dialog, DIALOG_STYLE_MSGBOX, "Klaida", "'Heal' Naudojimas: /Heal [ Nick/ID ]", "Iљeiti", "");
new string[64];
new name [MAX_PLAYER_NAME];
GetPlayerName(PID, name, MAX_PLAYER_NAME);
SetPlayerHealth(PID,100);
SetPlayerArmour(PID,100);
strcat(string, "{FFFFFF}%s ",name);
ShowPlayerDialog(playerid, Error_Dialog, DIALOG_STYLE_MSGBOX, "pagydėtę ", string, "Hide", "");
return true;
}
error
Код:
C:\Users\Juraska\Desktop\Imporan files\SA-MP\San andreas Multi-Player my server\gamemodes\Test..pwn(328) : error 035: argument type mismatch (argument 3)
Please help


Re: Help - linuxthefish - 29.06.2011

Indent your code fucktard, than it might be easier to fucking read!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!

This dumb shitass forum requires that you wait 120 seconds between posts. Please try again in 30 seconds.


Re: Help - Kitten - 29.06.2011

Quote:
Originally Posted by linuxthefish
Посмотреть сообщение
Indent your code fucktard, than it might be easier to fucking read!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!

This dumb shitass forum requires that you wait 120 seconds between posts. Please try again in 30 seconds.
Don't need to be so rude about it take a chill pill

pawn Код:
COMMAND:heal(playerid, params[])
{
    new PID;
    if( sscanf( params,"u",PID ) )
    return ShowPlayerDialog(playerid, Error_Dialog, DIALOG_STYLE_MSGBOX, "English D:", "'Heal' Usage: /Heal [ Nick/ID ]", "Iљeiti", "");
    new string[64];
    new name [MAX_PLAYER_NAME];
    GetPlayerName(PID, name, MAX_PLAYER_NAME);
    SetPlayerHealth(PID,100);
    SetPlayerArmour(PID,100);
    strcat(string, "{FFFFFF}%s ",name);
    ShowPlayerDialog(playerid, Error_Dialog, DIALOG_STYLE_MSGBOX, "English please D: ", string, "Hide", "");
    return true;
}
Whats line 328


Re: Help - iPLEOMAX - 29.06.2011

Do i see something wrong with strcat? Oh well.

SA-MP Wiki: Strcat


Re: Help - juraska - 29.06.2011

Quote:
Originally Posted by Kitten
Посмотреть сообщение
Don't need to be so rude about it take a chill pill

pawn Код:
COMMAND:heal(playerid, params[])
{
    new PID;
    if( sscanf( params,"u",PID ) )
    return ShowPlayerDialog(playerid, Error_Dialog, DIALOG_STYLE_MSGBOX, "English D:", "'Heal' Usage: /Heal [ Nick/ID ]", "Iљeiti", "");
    new string[64];
    new name [MAX_PLAYER_NAME];
    GetPlayerName(PID, name, MAX_PLAYER_NAME);
    SetPlayerHealth(PID,100);
    SetPlayerArmour(PID,100);
    strcat(string, "{FFFFFF}%s ",name);
    ShowPlayerDialog(playerid, Error_Dialog, DIALOG_STYLE_MSGBOX, "English please D: ", string, "Hide", "");
    return true;
}
Whats line 328
here is
pawn Код:
strcat(string, "{FFFFFF}%s ",name);



Re: Help - iPLEOMAX - 29.06.2011

Try this, as i said before, something is wrong with strcat.

pawn Код:
COMMAND:heal(playerid, params[])
{
    new PID;
    if( sscanf( params,"u",PID ) )
    return ShowPlayerDialog(playerid, Error_Dialog, DIALOG_STYLE_MSGBOX, "English D:", "'Heal' Usage: /Heal [ Nick/ID ]", "Iљeiti", "");
    new string[64];
    new name [MAX_PLAYER_NAME];
    GetPlayerName(PID, name, MAX_PLAYER_NAME);
    SetPlayerHealth(PID,100);
    SetPlayerArmour(PID,100);
    new string2[35];
    format(string2,35,"{FFFFFF}%s ",name);
    strcat(string, string2);
    ShowPlayerDialog(playerid, Error_Dialog, DIALOG_STYLE_MSGBOX, "English please D: ", string, "Hide", "");
    return true;
}
BTW, why are you using strcat here


Re: Help - juraska - 29.06.2011

Becouse my all script is in dialogs. I try do uniqeu script