Raised This Month: $ Target: $400
 0% 

[Help] Return function


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
jppmarujo
Junior Member
Join Date: Nov 2011
Location: Portugal
Old 11-21-2011 , 14:23   [Help] Return function
Reply With Quote #1

Hey guys,

So, i'm trying to lear pawn scripting and i'm doing it via the documentation stated in this forum, with the help of the Allied Modders Wiki.

I'm dividing this into sectors to better understand the parts that compose the whole.

I'm stuck in here, as i don't fully understand what's the return function job.

Code:
//This is a function that takes no parameters and returns 1. //When activated, it uses the (non-existant) print function. show() {    print("Hello!")      return 1   //End, return 1 }


If it didn't have the return function, wouldn't it be the same result? Being, printing the word "Hello"!

Sorry for my nooby question, but i like to make sure i fully understand each part to not make basic errors when i really start programming.



Thanks for your help in advance.
jppmarujo is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:25.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode