Help Error.

Blitz3D Forums/Blitz3D Programming/Help Error.

Yue(Posted 2013) [#1]



Gabriel(Posted 2013) [#2]
Since I can't actually see line 168 in your code, I can only guess. Typically you get that error when you try to access fields of a type by using the name of the type instead of an instance of the type. It's easy to get them confused.


Axel Wheeler(Posted 2013) [#3]
This error appears when Blitz thinks you are using a type, but you are not. You didn't post the code, but when I get this it's because I was using a backslash (\) somewhere I shouldn't. Perhaps you meant a forward slash for division? Or perhaps you are trying to include a file with the Include keyword and leaving off the quote marks ""?

Or maybe you are using a type, but misspelled the variable name.

Gives new meaning to the word "typo." He he...

BTW, your name says you are "Banished for pirate". Did you change your name, or did you get banished? Anyway, hopefully you can still read my response!

Good luck.


Yue(Posted 2013) [#4]
Hi, thanks for replying.

The problem happens when I try to retrieve a data from a "Type" from a function.

Sameple:


Type OB
  Field Name$
End Type


Global OBJ.OB = New OB

OBJ\Name$ = "Yue"

Function Sample()

Print (OBJ\Name$

End Function



virtlands(Posted 2013) [#5]
Hi Yue, ....

[obsolete post]


Yue(Posted 2013) [#6]
Hello, I've fixed the error, which was at the instance had been declared as Local. I'm really stupid.

@VirtLands
It is a satire RIFAF, sure everyone thinks born with a credit card and it is believed that more just than others. Sorry I had to express my point of view.

http://blitzbasic.com/Community/posts.php?topic=99911


xlsior(Posted 2013) [#7]
Yue: If you're unbanished, you may want to change your forum name again.


Axel Wheeler(Posted 2013) [#8]
Also, you're not actually running Sample.

A better approach might be, rather than declaring it as global, to declare it as local and then pass it to the function, like this:

Type OB
  Field Name$
End Type

Local OBJ.OB = New OB
OBJ\Name$ = "Yue"

Sample(OBJ)

Function Sample(o.OB)
   Print o\Name$
End Function

Keep in mind that when you pass an instance of a type this way, you pass the actual instance (not a copy), even though the function uses its own name for it. So whatever Sample() does to o.OB will be done to the original OBJ.OB as well:

Type OB
  Field Name$
End Type

Local OBJ.OB = New OB
OBJ\Name$ = "Yue"

Sample(OBJ)
Print OBJ\Name$
WaitKey()

Function Sample(o.OB)
   o\Name$=o\Name$+" (Banished for pirate)"
End Function

So, think of an object as an actual 'thing' being passed like a package. This is called "passing by reference", as opposed to "passing by value" like an int or float would be. This works the same way in object oriented languages too.


Yue(Posted 2013) [#9]
@Axel Wheeler

Hi thanks for your help, the question: The parameter is required in the role? or is there some other way to pass a null.

sample.
Function Sample(o.OB=0) ; << Error
   if o.OB <> 0 o\Name$=o\Name$+" (Banished for pirate)"
End Function



GitTech(Posted 2013) [#10]
Try Null instead of 0


Axel Wheeler(Posted 2013) [#11]
I believe you don't actually need o.OB=Null, because it's assumed. That is, if o.OB is null it will still pass it, although it will generate an error if you attempt to access o.OB's data, like:
Print o\Name$


I think that's the case


Yue(Posted 2013) [#12]
What happens is that I have a reusable function may not always need the object parameter.


Yasha(Posted 2013) [#13]
What happens is that I have a reusable function may not always need the object parameter


You can't do this in B3D, it's a language limitation. I guess at the time Mark just didn't think anyone would need to do that. (The technical reason is that defaults must be constant, but B3D doesn't consider Null to be constant... Why this is the case, I could not say.)

The closest equivalent is to pass a Handle, and have it default to 0 when it isn't necessary; otherwise, you'll just have to always remember to pass Null by hand whenever the function is called.


Yue(Posted 2013) [#14]
Possible solution and if not the most recomentable:

Create an instance of an object that will not be used and then remove it, but always pass a parameter.


K(Posted 2013) [#15]
WARNING: Taking a step back to exile/piracy... if anyone objects I'll remove the following post, with no resentment.

It is a satire RIFAF, sure everyone thinks born with a credit card and it is...

So you gripe to everyone instead of talking things out? I just vote keep from being a flamewar...
If I correctly understand your statement to be this: that we are all present capitalist pigs,etc.etc. ... than I must say that view is prejudicial. I had no computer until yesterday, only a datastick. My father has done hard labor all his life. I work.
Illustration : just because my friend has a atv but I cannot afford one doesn't mean I should demand he help me steal one.

I hope this does not get twisted by google translator.


RemiD(Posted 2013) [#16]
I want to add that just because one live in a high tech country, does not mean that one is rich or has a bank card.
I have also to work hard to earn money to buy what i want and the cost of living in France is not cheap!

I understand that you may not be able to have a bank card or a Paypal account in Colombia. In this case, some alternative solutions exist :
https://www.moneybookers.com/ads/merchant-account/payment-options/
or
http://www.payoneer.com/VirtualCard.aspx
http://www.empresasvirtuales.net/index.php?option=com_content&view=article&id=92&Itemid=135

These are just suggestions, i don't live in Colombia so i can't say if it works, but i know some people do that.


Yue(Posted 2013) [#17]
I ask pardon me, at any time I want to interpret things that I did not want to say, if it is to be realistic in a poor country live better developped, and is just that. On this planet we live each in different circumstances. What really hurt me is to publish it in the forum, I was hurt, could simply ignore my message I sent by email as with beggar on the street or answer saying his view as one day and did Yasha ready.

But if it's about my life and that of insurance you have much in controversy, but this is not the case.

I beg exucesen.


Axel Wheeler(Posted 2013) [#18]
K said:

So you gripe to everyone instead of talking things out? I just vote keep from being a flamewar...


That's hilarious. Nobody flamed until this post:

If I correctly understand your statement to be this: that we are all present capitalist pigs,etc.etc. ... than I must say that view is prejudicial.
...
I hope this does not get twisted by google translator.


I'm sure it was already twisted. Yue never made a single comment about people in rich countries, or even rich people in general, except to say that they have more money than people in poorer countries. You applied your political filter to his words.

RemiD said:

I want to add that just because one live in a high tech country, does not mean that one is rich or has a bank card.
I have also to work hard to earn money to buy what i want and the cost of living in France is not cheap!


Yes, you work hard. But in France if you work hard you can get good money. In many countries you must work hard and still get no money to speak of. I'm sure the real buying power one gets for an hour of work in France is vastly greater than in Colombia.

And obviously he wasn't talking about lacking a method of payment. It's the money itself!

I am not defending Yue's email to RifRaf at all. It was wrong. But you guys seem to be reacting to what he didn't say.


Yue(Posted 2013) [#19]
This really is painful ... I do not speak English and explain openly and clearly what happens.

Well, last almost a year saving every penny to buy a pc for parts and if not for that I search google all I can pirate software would have to have my hard drive blank. And how is it that I have? Blitz3D and BlitzPlus?, Simple grant me an unknown internet shopping, presisamente from France, and is awarded BlitzPlus free.

I am simply the result of the circumstances, but if I could change the world I would.


RemiD(Posted 2013) [#20]

Yes, you work hard. But in France if you work hard you can get good money. In many countries you must work hard and still get no money to speak of. I'm sure the real buying power one gets for an hour of work in France is vastly greater than in Colombia.


Axel Wheeler>>
This is far from the reality of things here, what i earn depends also on the amount of taxes i have to pay... And "good money" depends on the cost of living in a country.
If Yue was able (and managed) to sell softwares and/or video games to people in rich countries, he would get rich really quick because the cost of living in his country is small (and it is a tropical country the climate must be pleasant)
I plan to pay to visit Ecuador someday and maybe live there. ahahah the irony of things.



Yue>>I understand your situation may be complicated to access the same services we have in rich countries, but let's keep moving forward constructively.
See my posts for ways to get a bank account / bank card, it may be helpful if you decide to sell a software or a video game in the future. Do what you want with this.


Axel Wheeler(Posted 2013) [#21]

This is far from the reality of things here, what i earn depends also on the amount of taxes i have to pay... And "good money" depends on the cost of living in a country.


RemiD:
Do a quick google image search on Poverty Colombia, then imagine explaining to those people how your situation compares to theirs because of your high taxes and the high cost of living in France.

If Yue was able (and managed) to sell softwares and/or video games to people in rich countries, he would get rich really quick because the cost of living in his country is small...


Let's all hope for that! :-)


Yue(Posted 2013) [#22]
My kitchen.




My rental.


Nobody knows I have a computer in this neighborhood, if they knew it could kill me.

As I have access to a savings account?, I think the incliname to learn computers have taken the worst choice, because everything I know I learned empirically.

On when I can sell a 3d model made &#8203;&#8203;by a self-taught on the network?

I do not want to feel hurt, at least that's what you do with people asking for money on the street but do not do anything for them, or perhaps that the great millionaires not visit Africa in their luxurious cars, as this will cause remorse. If you were to ask me as possibly I live here, my past, my expectations, I live with, but that's not the case, the reality is that if someone does not write in order to reproach me my way act ....

Similarly I apologize I do not want to offend anyone with what he said or the way I act. thousand times sorry.


RemiD(Posted 2013) [#23]
Yue>>I bet you would not believe me if i tell you that i have lived in a smaller room than that with probably less confort during some time a few years ago (in France!)

Anyway, i encourage you to keep learning to make meshes and textures and to code and i am sure you will manage to create something useful and to sell it.
If you are good at UVMapping and texturing, i may hire you and pay you for your service.

Also do you know how to use 3d world studio ?

Don't give up. (and don't tell your neighbours that you have pc ;))

Question : how do you find electricity ? and how do you manage to connect to the internet ?


Yue(Posted 2013) [#24]
Hello, I use a cellular modem that uses a phone SIM, which is charged per month for 25,000 pesos worth something like $ 10, this is very slow.

The good thing is that if I have internet payment, otherwise not.

The empirical truth in many things I am, I have no basic studies certificates or anything, but with the help of google things I learned empirically ... do not know where this will take me but the idea is to learn, possibly serve me something in the future or maybe not.


http://www.uffmovil.com/




virtlands(Posted 2013) [#25]
Hi Yue, THat's an awesome and scary story.
I wasn't aware of your story until this posting, since we don't know
member's locations by the internet alone.


Yue(Posted 2013) [#26]


Translate Google Spanihs-English

"The methodology is simple, is you manage to get there more than 190,000 pesos a month, stop being poor"


When the license costs XORs Engine, 100 U.S., at 220,000 Colombian pesos pesos is the third of a minimum wage in Colombia, and I got that case to survive the month.

I have two or three options, deny the possibility of having access to a program and resign, ask someone to regale me an illegal copy or a license, or fight google searching and hopefully find it.


Kryzon(Posted 2013) [#27]
Unity has a free version that you can use to make games and sell them yourself (through PayPal, Amazon Payments or Google Checkout), let Unity Union take care of promoting your game or even look for third-party sponsoring.
There's no need to say how capable this game engine is, even in its very limited free version.

Blender3D is free, can generate 3D and 2D content and it's totally capable of top class results.
Unity free has native support of the .blend scene format it produces.

Gimp is free, allows you to paint textures, backgrounds and images and is also capable of letting you get top class results.
However, you do need a Wacom tablet to achieve these results, so you'll have to work a main job until you can save enough to get something like a Bamboo tablet.

Audacity is the most famous free audio editor available, and while being feature rich it also allows you to export to OGG files, a patent-free audio format natively supported by Unity free that can be used for sound effects or music.
Unity free also supports MOD (module) music natively, and there are some free mod music archives on various websites.
There's a creative commons sound effects archive online called FreeSound. There are other online places for free sound effects and music under Creative Commons license or others, but they need some Google digging.


K(Posted 2013) [#28]
@Axel
I'm sure it was already twisted. Yue never made a single comment about people in rich countries, or even rich people in general, except to say that they have more money than people in poorer countries. You applied your political filter to his words.
I do not resent that (Honestly I don't participate in or care about politics in the least) but I drect attention to Post #6, which said ...It is a satire RIFAF, sure everyone thinks born with a credit card... I took this to be a generalized statement, but perhaps this was a semanting glitch from GT... i.e. it may have indicated "RifRaf thinks everyone's born.." etc.
@YUE
I see your situation, I admit mine is better. I apologize for bringing this up. I say this though: I am not Rich. My family used to live in a tent in the mountains (USA).
Good luck- I think you need it more than me. Actually, farewell... this is my last post.
My worry was that on thes forums we have not faces, only false names, and thus you blamed us all etc.
Personally I think this kind of matter should be talked over privately, rather than thrown into the open.
Please forgive me for causing this trouble.
-K


RemiD(Posted 2013) [#29]

I have two or three options, deny the possibility of having access to a program and resign, ask someone to regale me an illegal copy or a license, or fight google searching and hopefully find it.


Or work as a freelancer to earn more money and to buy what you need.
But for this you need a bank account.

If you really want to improve your situation, selling products or your service on the internet may be a good way to earn more money. But you need at least a bank account.

I am curious why you can't have one ?




I say this though: I am not Rich. My family used to live in a tent in the mountains (USA).


K>>I use to live in the streets and in the woods a few years ago and i was not alone... (in France), so i don't like when some people say that all people in rich countries are rich.
But i agree that we have an easier access to facilities and to means of payment.



Here are two websites that may be helpful to you :
elance.com
freelancer.com

but you need a bank account to be a freelancer on these platforms...


Yue(Posted 2013) [#30]
To open an account I need at least 50,000 pesos, that amounts to about three days of work, if I open insurance these days not as neither I nor my daughter, just as I appreciate your good intentions.


virtlands(Posted 2013) [#31]
I hope things shall improve for Yue. Only you know what's happening over there.

The internet reaches all over, but I think you're probably the only member from Columbia. ;)


Oster(Posted 2013) [#32]
Yue, honestly think about your situation. You should focus on something else, try to put myself in their shoes and not just good intentions can live nobody listen to me, no one will give you a penny, just good intentions and that out of step. Think for a moment about all the time lost with this in the video games, you probably have something better to do but you can still start over on something else.

Sorry if I offend.


RemiD(Posted 2013) [#33]
I think that if the internet persists in his area, that's a good way to earn more money, else that's a waste of time and efforts.


Axel Wheeler(Posted 2013) [#34]
Oster,

I'm not sure if you're saying Yue won't make it as an indie programmer, or that Blitz3d isn't a language in demand, or what? He seems to be OK with Blitz just as a hobby for now. There's something very liberating about programming, especially this kind of programming. We don't know how old he is, or what his potential really is. It can start out as a hobby, and who knows from there?

I would only suggest that if Yue wants to be hired as a computer programmer at some point in the future, the big languages seem to be Java, C# and still C++ to some extent (C++ particularly in games). None of those are BASIC languages like Blitz. People seem to start out with C and then move to one of those three languages (all are based on C and most books/courses tend to assume you know C even if they don't say so).

However, for indie programmers the trend is toward portable devices, and there's no reason a person couldn't make a hit with something like Monkey or Corona, or BlitzMax (miniB3D? not sure what those folks are using now).

I know that those who hire programmers tend to prefer self-taught programmers over the computer science degrees, assuming the same level of knowledge, because the self-taught ones are so much more motivated. I know two top programmers ($100,000+/year) who never took a computer science class (as far as I know) although they did graduate college (one has a film degree, the other linguistics).

There are software companies in Colombia, and if Yue has a passion for it and puts in the effort needed to learn there's no reason he couldn't be successful. That's my point. Don't forget developers often start out with testing jobs and such. Of course every society has social class issues and all that stuff that Yue has to take into account.

I'm blathering!