SA:MP Pawno Warnings [Need Assistance] -
Mike_Rutherson - 19.02.2012
Код:
C:\Users\Tran\Desktop\Mike's Roleplay 0.3d\gamemodes\larp.pwn(23536) : warning 217: loose indentation
C:\Users\Tran\Desktop\Mike's Roleplay 0.3d\gamemodes\larp.pwn(23537) : warning 217: loose indentation
C:\Users\Tran\Desktop\Mike's Roleplay 0.3d\gamemodes\larp.pwn(30944) : warning 219: local variable "idcar" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Warnings.
I need help removing all the warnings on my gamemode.
Re: SA:MP Pawno Warnings [Need Assistance] -
Sufyan - 19.02.2012
hello for loose indentation
just add top of your script
and for idcar warning change idcar to idcar1
Re: SA:MP Pawno Warnings [Need Assistance] -
iPLEOMAX - 19.02.2012
https://sampforum.blast.hk/showthread.php?tid=274028 for solving most warnings.
For " shadows at a preceding level":
pawn Код:
new MyVar;
if(playerid == playerid)
{
new MyVar; //<-- Two variables with similar names causes this problem
//^ Rename or remove to fix.
}
Re: SA:MP Pawno Warnings [Need Assistance] -
Mike_Rutherson - 19.02.2012
Quote:
Originally Posted by Sufyan
hello for loose indentation
just add top of your script
and for idcar warning change idcar to idcar1
|
First, I tried the loose indentation and somehow I still have the same warning.
The other warning I did not understand the instructions you told me.
Re: SA:MP Pawno Warnings [Need Assistance] -
Mike_Rutherson - 19.02.2012
Quote:
Originally Posted by iPLEOMAX
https://sampforum.blast.hk/showthread.php?tid=274028 for solving most warnings.
For " shadows at a preceding level":
pawn Код:
new MyVar; if(playerid == playerid) { new MyVar; //<-- Two variables with similar names causes this problem //^ Rename or remove to fix. }
|
I don't know where to place it.
INFO: I'm a new scripter so I don't know what to do really
Re: SA:MP Pawno Warnings [Need Assistance] -
iPLEOMAX - 19.02.2012
This is when you get
indentation warnings:
pawn Код:
public MyCallback()
{
SendClientMessage(playerid, -1, "...");
printf("...");
Function();
return 1;
}
If the lines doesn't start with the proper tab.
To fix it:
Option 1:
pawn Код:
//Add this to the top of the script:
#pragma tabsize 0
Option 2:
pawn Код:
//Get everything in correct tabs:
public MyCallback()
{
SendClientMessage(playerid, -1, "...");
printf("...");
Function();
return 1;
}
So, fix the tabs of your warning lines.
---
And to fix: "local variable "Some Name" shadows a variable at a preceding level
You have to rename "idcar" of the other part to "idcar2" in your case.
You better show us the part of code.
Re: SA:MP Pawno Warnings [Need Assistance] -
Mike_Rutherson - 19.02.2012
PAWN Code
Код:
#include <a_samp>
#include <core>
#include <float>
#include <time>
#include <file>
#include <utils>
#include <morphinc>
#include <a_npc>
#include <streamer>
#include <Dini>
#include <dutils>
static gTeam[MAX_PLAYERS];
#pragma unused ret_memcpy
#pragma tabsize 0
#define Version "4.3"
Indentation
Код:
C:\Users\Tran\Desktop\Mike's Roleplay 0.3d\gamemodes\larp.pwn(23537) : warning 217: loose indentation
C:\Users\Tran\Desktop\Mike's Roleplay 0.3d\gamemodes\larp.pwn(23538) : warning 217: loose indentation
C:\Users\Tran\Desktop\Mike's Roleplay 0.3d\gamemodes\larp.pwn(30945) : warning 219: local variable "idcar" shadows a variable at a preceding level
Pawn compiler 3.2.3664 Copyright © 1997-2006, ITB CompuPhase
3 Warnings.
Re: SA:MP Pawno Warnings [Need Assistance] -
Mike_Rutherson - 19.02.2012
I cannot seem to find the pawn code of "idcar"
Re: SA:MP Pawno Warnings [Need Assistance] -
iGetty - 19.02.2012
CTRL + F, then see that. Otherwise, use CTRL + G and search for the numbers in the warning lines.
Re: SA:MP Pawno Warnings [Need Assistance] -
Mike_Rutherson - 19.02.2012
Quote:
Originally Posted by iGetty
CTRL + F, then see that. Otherwise, use CTRL + G and search for the numbers in the warning lines.
|
Nope, I still can't find it