Never heard before of this
#1

2 errors which never happened before.

Код:
D:\DOCUME~1\ANDY~1\MYDOC~1\_UF_SF~1\GAMEMO~1\_UF_SF~1.PWN(1085) : warning 219: local variable "PlayerName" shadows a variable at a preceding level
D:\DOCUME~1\ANDY~1\MYDOC~1\_UF_SF~1\GAMEMO~1\_UF_SF~1.PWN(3377) : error 021: symbol already defined: "strtok"
D:\DOCUME~1\ANDY~1\MYDOC~1\_UF_SF~1\GAMEMO~1\_UF_SF~1.PWN(3399) : error 047: array sizes do not match, or destination array is too small
Pawn compiler 3.2.3664	 	 	Copyright © 1997-2006, ITB CompuPhase


2 Errors.
pawn Код:
stock SetPlayerHealth2(playerid, Float:health)
- 3377
pawn Код:
return result;
- 3399

My friend can compile this, but I can't without errors.
Reply
#2

if result is an array it's not smart, try something else, and strtok glitch, IDK, check includes and your script, a lot of problems come from includes not going with script.
Reply
#3

I don't know what result is filled with nor what it's supposed to return, so can we have some more code?

Make sure you don't have more than one strtok either, if there's not more than one strtok in your script, check your includes.

aaaaaaand.... you've got more than one "PlayerName" in the same public/function.
Reply
#4

Quote:
Originally Posted by Joe_
aaaaaaand.... you've got more than one "PlayerName" in the same public/function.
It's likely to be in case like this :
new PlayerName[24]; // When having variable like PinF[PlayerName] >> enums make annoying overlays, so this can be skipped as he said about errors. Another thing to add - pawno isn't that stupid, oversize in usage (oversize/too small size for lets say string) may cause this not maching array sizes and pawno is likely to make error at function itself, not place where it's called, i have got this too.
Reply
#5

Quote:
Originally Posted by RSX
Quote:
Originally Posted by Joe_
aaaaaaand.... you've got more than one "PlayerName" in the same public/function.
It's likely to be in case like this :
new PlayerName[24]; // When having variable like PinF[PlayerName] >> enums make annoying overlays, so this can be skipped as he said about errors. Another thing to add - pawno isn't that stupid, oversize in usage (oversize/too small size for lets say string) may cause this not maching array sizes and pawno is likely to make error at function itself, not place where it's called, i have got this too.
Yh, thanks for explanation, but how can I avoid or fix this?
Reply
#6

First: give us the function, second, maybe needed, search for PlayerName variables in script. What about first errors?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)