SA-MP Forums Archive
Help with my script please! - 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: Help with my script please! (/showthread.php?tid=430187)



Help with my script please! - BigDee - 13.04.2013

Hey guys, in my script I have some warnings (around 5) and I don't know how to fix them! please if someone can just help me fix them, thank you!

Код:
C:\Users\\Desktop\TDM SERVER\gamemodes\VGTDM.pwn(70) : warning 201: redefinition of constant/macro (symbol "COLOR_PURPLE")
C:\Users\\Desktop\TDM SERVER\gamemodes\VGTDM.pwn(177) : warning 202: number of arguments does not match definition
C:\Users\\Desktop\TDM SERVER\gamemodes\VGTDM.pwn(179) : warning 202: number of arguments does not match definition
C:\Users\\Desktop\TDM SERVER\gamemodes\VGTDM.pwn(467) : warning 217: loose indentation
C:\Users\Desktop\TDM SERVER\gamemodes\VGTDM.pwn(471) : warning 217: loose indentation
Move to this section since I posted it in the wrong section


Re: Help with my script please! - Giroud12 - 13.04.2013

Post all your code then tell the errors line


Re : Help with my script please! - thegreathom - 13.04.2013

Код:
C:\Users\\Desktop\TDM SERVER\gamemodes\VGTDM.pwn(177) : warning 202: number of arguments does not match definition
C:\Users\\Desktop\TDM SERVER\gamemodes\VGTDM.pwn(179) : warning 202: number of arguments does not match definition
- Number of arguments does not match definition
pawn Код:
CMD:centermap(playerid,params[])
{
    #pragma unused params
    SetPlayerPos(playerid,0.0,0.0,3.0,90.0); // We've put the angle here too 'by accident'
    SendClientMessage(playerid,-1,"You have been sent to the center of the map in Blue Berry.");
    return 1;
}
pawn Код:
CMD:centermap(playerid,params[])
{
    #pragma unused params
    SetPlayerPos(playerid,0.0,0.0,3.0);
    SetPlayerFacingAngle(playerid,90.0); // Correct is to put the angle into this function.
    SendClientMessage(playerid,-1,"You have been sent to the center of the map in Blue Berry.");
    return 1;
}
Код:
C:\Users\\Desktop\TDM SERVER\gamemodes\VGTDM.pwn(467) : warning 217: loose indentation
C:\Users\Desktop\TDM SERVER\gamemodes\VGTDM.pwn(471) : warning 217: loose indentation
- Loose Indentation
pawn Код:
public OnPlayerLeaveCheckpoint(playerid)
{
    SendClientMessage(playerid,-1,"You have left a checkpoint.");
        print("Someone left a checkpoint");
    return 1;
}
pawn Код:
public OnPlayerLeaveCheckpoint(playerid)
{
    SendClientMessage(playerid,-1,"You have left a checkpoint.");
    print("Someone left a checkpoint");
    return 1;
}
Код:
C:\Users\\Desktop\TDM SERVER\gamemodes\VGTDM.pwn(70) : warning 201: redefinition of constant/macro (symbol "COLOR_PURPLE")
They are already defined somewhere in your script and you're trying to re-define them

or simply at @http://forum.sa-mp.com/showthread.ph...59#post1327459


Re: Re : Help with my script please! - MP2 - 13.04.2013

Quote:
Originally Posted by thegreathom
Посмотреть сообщение
Код:
C:\Users\\Desktop\TDM SERVER\gamemodes\VGTDM.pwn(177) : warning 202: number of arguments does not match definition
C:\Users\\Desktop\TDM SERVER\gamemodes\VGTDM.pwn(179) : warning 202: number of arguments does not match definition
- Number of arguments does not match definition
  • Cause: You got more or less arguments (couldn't say it in another way) than you actually got to have.
Or the type is wrong (e.g. it is expecting an array and you pass an integer).


Re: Help with my script please! - BigDee - 13.04.2013

Gee, I don't know how to script :P so um.... yeah but thanks for the help guys I'll try to fix it


Re: Help with my script please! - Ponii - 13.04.2013

Its just a warning. its not a error. But if you can fix it, go for it.


Re: Help with my script please! - Scenario - 13.04.2013

Quote:
Originally Posted by Ponii
Посмотреть сообщение
Its just a warning. its not a error. But if you can fix it, go for it.
You're an idiot if you think you can just ignore a warning since the compiler still makes a .amx file. Even if it isn't necessarily an ERROR, it's a cause for concern. Unless, of course, you know EXACTLY why the warning is occurring and KNOW for a FACT that the compiler is wrong. In which case you COULD ignore it, or perform certain actions to tell the compiler not to worry about it.


Re: Help with my script please! - MP2 - 13.04.2013

Quote:
Originally Posted by Ponii
Посмотреть сообщение
Its just a warning. its not a error. But if you can fix it, go for it.
Actually it is an error, because it won't have the desired effect. He's done something wrong - he's made an error.

Just because pawncc doesn't spoonfeed you an error message, doesn't mean your mistakes aren't errors: