SA-MP Forums Archive
whats wrong :O ? - 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: whats wrong :O ? (/showthread.php?tid=346969)



whats wrong :O ? - [D]ry[D]esert - 30.05.2012

Hi all i was wondering whats wrong with that ?
pawn Код:
if (strcmp("/skills", cmdtext, true, 10) == 0)
    {
    new Eagle[50],Sniper[50],Ak47[50],Sawnoff[50],Spaz[50],Uzi[50],Mp5[50],Shotgun[50];
    format(Eagle,sizeof(Eagle),"Eagle:%d",AccountInfo[playerid][Eagle]);
    format(Sniper,sizeof(Sniper),"Sniper:%d",AccountInfo[playerid][Sniper]);
    format(Ak47,sizeof(Ak47),"Ak47:%d",AccountInfo[playerid][Ak47]);
    format(Sawnoff,sizeof(Sawnoff),"Sawnoff:%d",AccountInfo[playerid][Sawnoff]);
    format(Spaz,sizeof(Spaz),"Spaz:%d",AccountInfo[playerid][Spaz]);
    format(Uzi,sizeof(Uzi),"Uzi:%d",AccountInfo[playerid][Uzi]);
    format(Mp5,sizeof(Mp5),"Mp5:%d",AccountInfo[playerid][Mp5]);
    format(Shotgun,sizeof(Shotgun),"Shotgun:%d",AccountInfo[playerid][Shotgun]);
    SendClientMessage(playerid,-1,Eagle);
    SendClientMessage(playerid,-1,Sniper);
    SendClientMessage(playerid,-1,Ak47);
    SendClientMessage(playerid,-1,Sawnoff);
    SendClientMessage(playerid,-1,Spaz);
    SendClientMessage(playerid,-1,Uzi);
    SendClientMessage(playerid,-1,Mp5);
    SendClientMessage(playerid,-1,Shotgun);
    }
Errors Show :
pawn Код:
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 219: local variable "Eagle" shadows a variable at a preceding level
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 219: local variable "Sniper" shadows a variable at a preceding level
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 219: local variable "Ak47" shadows a variable at a preceding level
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 219: local variable "Sawnoff" shadows a variable at a preceding level
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 219: local variable "Spaz" shadows a variable at a preceding level
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 219: local variable "Uzi" shadows a variable at a preceding level
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 219: local variable "Mp5" shadows a variable at a preceding level
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 219: local variable "Shotgun" shadows a variable at a preceding level
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(396) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(396) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(397) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(397) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(398) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(398) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(399) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(399) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(400) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(400) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(401) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(401) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(402) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(402) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(403) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(403) : error 035: argument type mismatch (argument 1)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(404) : error 035: argument type mismatch (argument 3)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(405) : error 035: argument type mismatch (argument 3)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(406) : error 035: argument type mismatch (argument 3)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(407) : error 035: argument type mismatch (argument 3)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(408) : error 035: argument type mismatch (argument 3)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(409) : error 035: argument type mismatch (argument 3)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(410) : error 035: argument type mismatch (argument 3)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(411) : error 035: argument type mismatch (argument 3)
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 204: symbol is assigned a value that is never used: "Shotgun"
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 204: symbol is assigned a value that is never used: "Mp5"
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 204: symbol is assigned a value that is never used: "Uzi"
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 204: symbol is assigned a value that is never used: "Spaz"
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 204: symbol is assigned a value that is never used: "Sawnoff"
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 204: symbol is assigned a value that is never used: "Ak47"
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 204: symbol is assigned a value that is never used: "Sniper"
C:\Users\almooo\Desktop\Zombe server test\gamemodes\DeathMatch.pwn(395) : warning 204: symbol is assigned a value that is never used: "Eagle"
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase


24 Errors.



Re: whats wrong :O ? - MP2 - 30.05.2012

Change the variable names - they are already used.


Re: whats wrong :O ? - ivanVU - 30.05.2012

Try like this

Quote:

if (strcmp("/skills", cmdtext, true, 10) == 0)
{
new Eagle1[50],Sniper1[50],Ak471[50],Sawnoff1[50],Spaz1[50],Uzi1[50],Mp51[50],Shotgun1[50];
format(Eagle1,sizeof(Eagle1),"Eagle:%d",AccountInf o[playerid][Eagle]);
format(Sniper1,sizeof(Sniper1),"Sniper:%d",Account Info[playerid][Sniper]);
format(Ak471,sizeof(Ak471),"Ak47:%d",AccountInfo[playerid][Ak47]);
format(Sawnoff1,sizeof(Sawnoff1),"Sawnoff:%d",Acco untInfo[playerid][Sawnoff]);
format(Spaz1,sizeof(Spaz1),"Spaz:%d",AccountInfo[playerid][Spaz]);
format(Uzi1,sizeof(Uzi1),"Uzi:%d",AccountInfo[playerid][Uzi]);
format(Mp51,sizeof(Mp51),"Mp5:%d",AccountInfo[playerid][Mp5]);
format(Shotgun1,sizeof(Shotgun1),"Shotgun:%d",Acco untInfo[playerid][Shotgun]);
SendClientMessage(playerid,-1,Eagle1);
SendClientMessage(playerid,-1,Sniper1);
SendClientMessage(playerid,-1,Ak471);
SendClientMessage(playerid,-1,Sawnoff1);
SendClientMessage(playerid,-1,Spaz1);
SendClientMessage(playerid,-1,Uzi1);
SendClientMessage(playerid,-1,Mp51);
SendClientMessage(playerid,-1,Shotgun1);
}