SA-MP Forums Archive
Problem here? - 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: Problem here? (/showthread.php?tid=89676)



Problem here? - Sal_Kings - 03.08.2009

Код:
if(!strcmp(cmdtext,"/MyWeed",true))
	{
  hashweed[playerid] = hasweed[playerid];
  format(string, sizeof(string)/* You forgot the comma (,) here*/, "You have %d weed!", hasweed[playerid);
  return 1;
}
This is suppose to tell you how much weed you have.

Код:
C:\Documents and Settings\home\Desktop\Salims folder\_gamemodes__gamemodes_SalsTestingGrounds.pwn(805) : error 017: undefined symbol "hashweed"
C:\Documents and Settings\home\Desktop\Salims folder\_gamemodes__gamemodes_SalsTestingGrounds.pwn(805) : warning 215: expression has no effect
C:\Documents and Settings\home\Desktop\Salims folder\_gamemodes__gamemodes_SalsTestingGrounds.pwn(805) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\home\Desktop\Salims folder\_gamemodes__gamemodes_SalsTestingGrounds.pwn(805) : error 029: invalid expression, assumed zero
C:\Documents and Settings\home\Desktop\Salims folder\_gamemodes__gamemodes_SalsTestingGrounds.pwn(805) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.



Re: Problem here? - ғαιιοцт - 03.08.2009

Код:
if(!strcmp(cmdtext,"/MyWeed",true))
	{
  format(string, sizeof(string), "You have %d weed!", hasweed[playerid);
  return 1;
}



Re: Problem here? - Sal_Kings - 03.08.2009

What?


Re: Problem here? - Sal_Kings - 03.08.2009

Still wont work


Re: Problem here? - ғαιιοцт - 03.08.2009

Quote:
Originally Posted by Sal_Kings
Still wont work
sorry, I edited

and what about this topic?
http://forum.sa-mp.com/index.php?topic=109003.0


Re: Problem here? - yezizhu - 03.08.2009

[quote=Sal_Kings ]
Код:
if(!strcmp(cmdtext[1],"MyWeed",true)) 
	{ 
  hashweed[playerid] = hasweed[playerid]; 
  format(string, sizeof(string), "You have %d weed!", hasweed[playerid]); 
  return 1; 
}
Edited: oh I'm late.


Re: Problem here? - ғαιιοцт - 03.08.2009

Quote:
Originally Posted by yezizhu
Quote:
Originally Posted by Sal_Kings
Код:
if(!strcmp(cmdtext[1],"MyWeed",true)) 
	{ 
  hashweed[playerid] = hasweed[playerid]; 
  format(string, sizeof(string), "You have %d weed!", hasweed[playerid]); 
  return 1; 
}
?
edit: you were probally sill typing ц


Re: Problem here? - Sal_Kings - 03.08.2009

Now this

Код:
C:\Documents and Settings\home\Desktop\Salims folder\_gamemodes__gamemodes_SalsTestingGrounds.pwn(805) : error 001: expected token: ",", but found ";"
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


1 Error.



Re: Problem here? - ғαιιοцт - 03.08.2009

Quote:
Originally Posted by [HLF
Southclaw ]
Код:
  new hasweed;
  hasweed[playerid] = hasweed[playerid];
what's the point of doing that?


Re: Problem here? - Sal_Kings - 03.08.2009

Quote:
Originally Posted by [HLF
Southclaw ]
if(!strcmp(cmdtext,"/MyWeed",true))
{
new hasweed;
hasweed[playerid] = hasweed[playerid];
format(string, sizeof(string, "You have %d weed!", hasweed[playerid);
return 1;
}
Код:
C:\Documents and Settings\home\Desktop\Salims folder\_gamemodes__gamemodes_SalsTestingGrounds.pwn(805) : warning 219: local variable "hasweed" shadows a variable at a preceding level
C:\Documents and Settings\home\Desktop\Salims folder\_gamemodes__gamemodes_SalsTestingGrounds.pwn(806) : error 028: invalid subscript (not an array or too many subscripts): "hasweed"
C:\Documents and Settings\home\Desktop\Salims folder\_gamemodes__gamemodes_SalsTestingGrounds.pwn(806) : warning 215: expression has no effect
C:\Documents and Settings\home\Desktop\Salims folder\_gamemodes__gamemodes_SalsTestingGrounds.pwn(806) : error 001: expected token: ";", but found "]"
C:\Documents and Settings\home\Desktop\Salims folder\_gamemodes__gamemodes_SalsTestingGrounds.pwn(806) : error 029: invalid expression, assumed zero
C:\Documents and Settings\home\Desktop\Salims folder\_gamemodes__gamemodes_SalsTestingGrounds.pwn(806) : fatal error 107: too many error messages on one line

Compilation aborted.Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


4 Errors.