SA-MP Forums Archive
Warning 208 - 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: Warning 208 (/showthread.php?tid=639806)



Warning 208 - Ramboi - 23.08.2017

What's the problem in this code?


Код:
Float:function1D24(playerid, Float:arg1[], Float:arg2[], Float:arg3)
{
	new Float:var0 = 0.0, Float:var1 = 0.0, Float:var2 = 0.0;
	new Float:var3 = 0.0;
	GetPlayerPos(playerid, var0, var1, var2);
	var3 = floatsqroot(floatpower(floatabs(arg1 - var0), 2.0) + floatpower(floatabs(arg2 - var1), 2.0) + floatpower(floatabs(arg3 - var2), 2.0));
	return floatround(var3, 0);
}



Re: Warning 208 - Misiur - 23.08.2017

The function has a Float tag set for its return value. You must put it before it is used for the first time, otherwise compiler has to go again to check if tags are matching.


Re: Warning 208 - 10MIN - 23.08.2017

Take a look at floatround and floatpower arguments and also look at this thread.


Re: Warning 208 - Vince - 23.08.2017

Decompiled script. Smells fishy.


Re: Warning 208 - Ramboi - 24.08.2017

Quote:
Originally Posted by Vince
Посмотреть сообщение
Decompiled script. Smells fishy.
I love how I see you every where talking shit, just f off.
Don't you have something else to do other then talking crap, yes I'm editing a damn script to learn.

oSAINTo:
Quote:

The way I learned, and I believe the majority of good programmers learned, is by just taking a gamemode that's already been made and messing around with it.

Kaperstone:
Quote:

Edit scripts in general.

https://sampforum.blast.hk/showthread.php?tid=636797


Re: Warning 208 - thegamer355 - 24.08.2017

Quote:
Originally Posted by Ramboi
Посмотреть сообщение
I love how I see you every where talking shit, just f off.
Don't you have something else to do other then talking crap, yes I'm editing a damn script to learn.

oSAINTo:



Kaperstone:



https://sampforum.blast.hk/showthread.php?tid=636797
He's not posting dumb shit, most scripters download a .pwn file and edit that, they don't decompile a script in order to learn, might be me.

Anyways the code in your first post, isn't giving errors to me


Re: Warning 208 - 10MIN - 24.08.2017

Editing scripts is not that good as you think. You could get a LOT of warnings, variables with crazy names / functions etc... Best way is to try to make your own gamemode and after learning how the basic callbacks from new.pwn works. (wiki contain everything)


Re: Warning 208 - Ramboi - 24.08.2017

Quote:
Originally Posted by thegamer355
Посмотреть сообщение
He's not posting dumb shit, most scripters download a .pwn file and edit that, they don't decompile a script in order to learn, might be me.

Anyways the code in your first post, isn't giving errors to me
I downloaded this mode, and I complied it to check if it's even working.


Re: Warning 208 - thegamer355 - 24.08.2017

then what's the issue with it?

to test if it's working, just go IG and do something which uses that code, that's what we all do, every single time we need to know if something works


Re: Warning 208 - Ramboi - 24.08.2017

Quote:
Originally Posted by thegamer355
Посмотреть сообщение
then what's the issue with it?

to test if it's working, just go IG and do something which uses that code, that's what we all do, every single time we need to know if something works
Let's get this straight, what do you mean by 'decompile'?