Raised This Month: $ Target: $400
 0% 

PAWN Objects


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Liverwiz
Veteran Member
Join Date: Feb 2010
Location: Maryland
Old 04-22-2012 , 13:52   PAWN Objects
Reply With Quote #1

Now.....i'm aware that pawn is a non-object oriented scripting language. So the closest thing you can get to that is either an array, including all the variables within the object, or a series of well documented variables.

Going along with the array way of doing things:

Code:
new object[3][34]
new i_obID = id
new sz_obName[32] = get_user_name(id)
new sz_obSteamID[34] = get_user_authid(id)

object[0] = i_obID
object[1] = sz_obName
object[2] = sz_obSteamID
Mind you this isn't exact code, i'm aware passing the ID can get me all this, i'm just using it all as the easiest example for those who aren't fully aware how objects in C++/Java work.

I suppose it all boils down to how to properly utilize a hanging(fringed} matrix....but pawn is so weird to me, and i'm out of proper practice with other languages.

i think it looks pretty, but when compiling the compiler throws errors like "array size do not match; or destination size too small"

Last edited by Liverwiz; 04-22-2012 at 13:54.
Liverwiz 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 07:50.


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