SA-MP Forums Archive
symbol is assigned a value that is never used: - 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: symbol is assigned a value that is never used: (/showthread.php?tid=218981)



symbol is assigned a value that is never used: - Divine - 31.01.2011

pawn Code:
forward weps();
public weps()
{
    new id;
    new amo = GetPlayerAmmo(id);
    new notallowed[4] = (35, 36, 37, 38);   // symbol is assigned a value that is never used: "notallowed"
    if(GetPlayerWeapon(id) == sizeof(notallowed) && amo >= 1 ) {
    return SendClientMessage(id, 0xF97804FF, "ur wep is not allowed !!");
    }
    return 1;
}
Im not sure whats wrong.... ;/


Re: symbol is assigned a value that is never used: - Calgon - 31.01.2011

pawn Code:
new notallowed[] = {35, 36, 37, 38};
Try this.


Re: symbol is assigned a value that is never used: - [03]Garsino - 31.01.2011

Also, your code will only work for ID 0.


Re: symbol is assigned a value that is never used: - Divine - 31.01.2011

Quote:
Originally Posted by Calgon
View Post
pawn Code:
new notallowed[] = {35, 36, 37, 38};
Try this.
same line more errors
pawn Code:
: error 017: undefined symbol "neleistinas"
: error 029: invalid expression, assumed zero
: warning 215: expression has no effect
: error 001: expected token: ";", but found ")"
: fatal error 107: too many error messages on one line