Quantcast
Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
    1. Welcome to GTAForums!

    1. Red Dead Redemption 2

      1. PC
      2. Gameplay
      3. Missions
      4. Help & Support
    2. Red Dead Online

      1. Gameplay
      2. Find Lobbies & Outlaws
      3. Help & Support
      4. Frontier Pursuits
    1. Crews & Posses

      1. Recruitment
    2. Events

    1. GTA Online

      1. Diamond Casino & Resort
      2. DLC
      3. Find Lobbies & Players
      4. Guides & Strategies
      5. Vehicles
      6. Content Creator
      7. Help & Support
    2. Grand Theft Auto Series

    3. GTA 6

    4. GTA V

      1. PC
      2. Guides & Strategies
      3. Help & Support
    5. GTA IV

      1. Episodes from Liberty City
      2. Multiplayer
      3. Guides & Strategies
      4. Help & Support
      5. GTA IV Mods
    6. GTA Chinatown Wars

    7. GTA Vice City Stories

    8. GTA Liberty City Stories

    9. GTA San Andreas

      1. Guides & Strategies
      2. Help & Support
      3. GTA SA Mods
    10. GTA Vice City

      1. Guides & Strategies
      2. Help & Support
      3. GTA VC Mods
    11. GTA III

      1. Guides & Strategies
      2. Help & Support
      3. GTA III Mods
    12. Top Down Games

      1. GTA Advance
      2. GTA 2
      3. GTA
    13. Wiki

      1. Merchandising
    1. GTA Modding

      1. GTA V
      2. GTA IV
      3. GTA III, VC & SA
      4. Tutorials
    2. Mod Showroom

      1. Scripts & Plugins
      2. Maps
      3. Total Conversions
      4. Vehicles
      5. Textures
      6. Characters
      7. Tools
      8. Other
      9. Workshop
    3. Featured Mods

      1. DYOM
      2. OpenIV
      3. GTA: Underground
      4. GTA: Liberty City
      5. GTA: State of Liberty
    1. Red Dead Redemption

    2. Rockstar Games

    1. Off-Topic

      1. General Chat
      2. Gaming
      3. Technology
      4. Programming
      5. Movies & TV
      6. Music
      7. Sports
      8. Vehicles
    2. Expression

      1. Graphics / Visual Arts
      2. GFX Requests & Tutorials
      3. Writers' Discussion
      4. Debates & Discussion
    1. News

    2. Forum Support

    3. Site Suggestions

Sign in to follow this  
haws1290

[LUA] Case Statements In Headscripts Lua mod

Recommended Posts

haws1290

Well due to complications I can't use elseifs because its plagiarism. I did some research on case statements but it doesn't seam to like it.

and an error is returned saying part = nil when it doesn't?

Also being spammed in the console is main.lua:145:attempt to index local 'mod' a boolean value. But jewelheist.tick is there so it shouldn't return false.

local jewelheist = {}local heistP = {start}function start()--Blah Blahendfunction SelectPart(case)        part = heistP[case]        if part ~= nil then            part()        else            print("Casey Error Cla Sond") --This is returned when part isn't nil            return false        end        return trueendfunction jewelheist.tick()   SelectPart(1)end
Edited by haws1290

Share this post


Link to post
Share on other sites
c39687

You can't use else if because of plagiarism?? That makes no sense

Share this post


Link to post
Share on other sites
haws1290

You can't use else if because of plagiarism?? That makes no sense

I know but because I used elseif part = 1, 2 etc. like someone else did and It got deleted because of plagiarism.

Edited by haws1290

Share this post


Link to post
Share on other sites
c39687

If it got deleted then it means you copy pasted another person's code. Also a switch statement is not interchangeable with else if always. A switch tests a value and calls the correct case where else if tests bool. So sure you can change to a switch but if you are still copying someone's code and just changing some else ifs to a switch, IMO you are still plagiarizing. Why are you stealing people's work and releasing as your own then?? People like you are annoying to people who work hard to release free stuff for the community. People like you make people scared to open source their work.

 

STOP COPYING OTHER PEOPLE'S WORK AND TRYING TO TAKE CREDIT!!

Share this post


Link to post
Share on other sites
Jsk2003

Calm down c39687, there is nothing that haws has said that suggests he's trying to take credit for other people's work. If you check his heist he released, he even credited Tri for his notify function since haws decided it was useful. Sooo you just have a bone to pick, or what?

 

Coding is like music, you take what you've heard and know, see what you can do with it, let it inspire you, run wild, and improve upon it. Looking in the LUA files to understand it and learn to implement modifications of your own is ENCOURAGED. How else do we get new/more people to join in the process of making great mods for the game?

 

So Haws, stick with what you know works, not everything has to be from your head, the only thing you should do if you ever copy/paste, add some comment before the snippet, giving credit to whomever designed it, and then MAKE SURE you understand what that code is doing. If you're not using other's code to improve upon your knowledge, YOU ARE DOING IT WRONG.

Share this post


Link to post
Share on other sites
c39687

He comes on here posting how changing some else ifs to a switch will allow him to bypass moderation for plagiarism. Since I can picture why he is saying it is pretty blatant he has admitted to plagiarism. I'm trying to educate children so if you have a problem with people respecting others work then just say so.

You are assuming I went out of my way to research this situation. Maybe op sucks at English but he admitted he was trying to hide his plagiarism. The only bone I have to pick is with you assuming I'm trying to start sh*t. I have had my work stolen before if you really want to know like many others who have open sourced stuff for public. Ok so go read opening post and tell me he provided all the details you mentioned. Either way the op made some really dumb comments... "I need to change else if to switch to avoid plagiarism"

Sounds pretty clear to me. Is op your girlfriend or something?

 

Also don't try to talk to me about inspiration vs copying when it comes to art. Vanilla Ice tried to say the same thing when he used a sample from David Bowie/Queen and guess what... the law deemed he was stealing (Pharo Monch/Godzilla sountrack). There is a fine line and if you are gonna come out and say "I need to change else if to switch or else it is plagiarism" then you just admitted it. OP must really suck at English or he is an idiot... not sure which one. And you coming here to defend your lady love is pathetic.

Edited by c39687

Share this post


Link to post
Share on other sites
haws1290

He comes on here posting how changing some else ifs to a switch will allow him to bypass moderation for plagiarism. Since I can picture why he is saying it is pretty blatant he has admitted to plagiarism. I'm trying to educate children so if you have a problem with people respecting others work then just say so.

 

You are assuming I went out of my way to research this situation. Maybe op sucks at English but he admitted he was trying to hide his plagiarism. The only bone I have to pick is with you assuming I'm trying to start sh*t. I have had my work stolen before if you really want to know like many others who have open sourced stuff for public. Ok so go read opening post and tell me he provided all the details you mentioned. Either way the op made some really dumb comments... "I need to change else if to switch to avoid plagiarism"

 

Sounds pretty clear to me. Is op your girlfriend or something?

 

Also don't try to talk to me about inspiration vs copying when it comes to art. Vanilla Ice tried to say the same thing when he used a sample from David Bowie/Queen and guess what... the law deemed he was stealing (Pharo Monch/Godzilla sountrack). There is a fine line and if you are gonna come out and say "I need to change else if to switch or else it is plagiarism" then you just admitted it. OP must really suck at English or he is an idiot... not sure which one. And you coming here to defend your lady love is pathetic.

Funny thing is I never copy and pasted his code. It was literally because I used the same method as him to go to different parts. Personally I believe you are starting sh*t and I believe because I used elseifs to go to different parts of the code it was deemed as copying. I don't really know how to use switch statements and funny thing is TRIFECTA was the one that told me to use switch statements. Idiot.

Share this post


Link to post
Share on other sites
c39687

 

He comes on here posting how changing some else ifs to a switch will allow him to bypass moderation for plagiarism. Since I can picture why he is saying it is pretty blatant he has admitted to plagiarism. I'm trying to educate children so if you have a problem with people respecting others work then just say so.

 

You are assuming I went out of my way to research this situation. Maybe op sucks at English but he admitted he was trying to hide his plagiarism. The only bone I have to pick is with you assuming I'm trying to start sh*t. I have had my work stolen before if you really want to know like many others who have open sourced stuff for public. Ok so go read opening post and tell me he provided all the details you mentioned. Either way the op made some really dumb comments... "I need to change else if to switch to avoid plagiarism"

 

Sounds pretty clear to me. Is op your girlfriend or something?

 

Also don't try to talk to me about inspiration vs copying when it comes to art. Vanilla Ice tried to say the same thing when he used a sample from David Bowie/Queen and guess what... the law deemed he was stealing (Pharo Monch/Godzilla sountrack). There is a fine line and if you are gonna come out and say "I need to change else if to switch or else it is plagiarism" then you just admitted it. OP must really suck at English or he is an idiot... not sure which one. And you coming here to defend your lady love is pathetic.

Funny thing is I never copy and pasted his code. It was literally because I used the same method as him to go to different parts. Personally I believe you are starting sh*t and I believe because I used elseifs to go to different parts of the code it was deemed as copying. I don't really know how to use switch statements and funny thing is TRIFECTA was the one that told me to use switch statements. Idiot.

 

lol dude don't be mad because I taught you something ;) just go take your new found knowledge and make the right choice :D

Share this post


Link to post
Share on other sites
Jsk2003

He comes on here posting how changing some else ifs to a switch will allow him to bypass moderation for plagiarism. Since I can picture why he is saying it is pretty blatant he has admitted to plagiarism. I'm trying to educate children so if you have a problem with people respecting others work then just say so.

 

You are assuming I went out of my way to research this situation. Maybe op sucks at English but he admitted he was trying to hide his plagiarism. The only bone I have to pick is with you assuming I'm trying to start sh*t. I have had my work stolen before if you really want to know like many others who have open sourced stuff for public. Ok so go read opening post and tell me he provided all the details you mentioned. Either way the op made some really dumb comments... "I need to change else if to switch to avoid plagiarism"

 

Sounds pretty clear to me. Is op your girlfriend or something?

 

Also don't try to talk to me about inspiration vs copying when it comes to art. Vanilla Ice tried to say the same thing when he used a sample from David Bowie/Queen and guess what... the law deemed he was stealing (Pharo Monch/Godzilla sountrack). There is a fine line and if you are gonna come out and say "I need to change else if to switch or else it is plagiarism" then you just admitted it. OP must really suck at English or he is an idiot... not sure which one. And you coming here to defend your lady love is pathetic.

 

You're being immature and ranting about nonsense, and resorting to childish insults... it's humorous.

 

He has only admitted to using another's code for the basis of his own fun mod, nowhere has he taken credit.

 

You're not trying to start sh*t? Man, I totally read your post incorrectly then, since it sounded like you were whining to me.

 

 

 

Why are you stealing people's work and releasing as your own then?? People like you are annoying to people who work hard to release free stuff for the community. People like you make people scared to open source their work.

 

STOP COPYING OTHER PEOPLE'S WORK AND TRYING TO TAKE CREDIT!!

lol dude don't be mad because I taught you something ;) just go take your new found knowledge and make the right choice :D

 

 

I did not know you couldn't read. That must be a hard life to live. Either you're a troll or...

 

3o0Ph8d.jpg

Share this post


Link to post
Share on other sites
c39687

 

He comes on here posting how changing some else ifs to a switch will allow him to bypass moderation for plagiarism. Since I can picture why he is saying it is pretty blatant he has admitted to plagiarism. I'm trying to educate children so if you have a problem with people respecting others work then just say so.

 

You are assuming I went out of my way to research this situation. Maybe op sucks at English but he admitted he was trying to hide his plagiarism. The only bone I have to pick is with you assuming I'm trying to start sh*t. I have had my work stolen before if you really want to know like many others who have open sourced stuff for public. Ok so go read opening post and tell me he provided all the details you mentioned. Either way the op made some really dumb comments... "I need to change else if to switch to avoid plagiarism"

 

Sounds pretty clear to me. Is op your girlfriend or something?

 

Also don't try to talk to me about inspiration vs copying when it comes to art. Vanilla Ice tried to say the same thing when he used a sample from David Bowie/Queen and guess what... the law deemed he was stealing (Pharo Monch/Godzilla sountrack). There is a fine line and if you are gonna come out and say "I need to change else if to switch or else it is plagiarism" then you just admitted it. OP must really suck at English or he is an idiot... not sure which one. And you coming here to defend your lady love is pathetic.

You're being immature and ranting about nonsense, and resorting to childish insults... it's humorous.

 

He has only admitted to using another's code for the basis of his own fun mod, nowhere has he taken credit.

 

You're not trying to start sh*t? Man, I totally read your post incorrectly then, since it sounded like you were whining to me.

 

 

Why are you stealing people's work and releasing as your own then?? People like you are annoying to people who work hard to release free stuff for the community. People like you make people scared to open source their work.

 

STOP COPYING OTHER PEOPLE'S WORK AND TRYING TO TAKE CREDIT!!

lol dude don't be mad because I taught you something ;) just go take your new found knowledge and make the right choice :D

 

I did not know you couldn't read. That must be a hard life to live. Either you're a troll or...

 

3o0Ph8d.jpg

 

oh wow an image and everything... u mad lol

 

btw, if your lady love clearly credited the original author, it would not have been deleted, which means he would have no need to change the else ifs to a switch :O

 

(assuming the moderator is a moron and allows him to copy someone's idea and logic, then just edit the way the cpu makes a comparison in a small part of the code)

Edited by c39687

Share this post


Link to post
Share on other sites
Jsk2003

Just keep trolling, just keep trolling.. trolling.. trolling. Please learn to communicate with others well before leaving youtube comments.

 

Now go, "take your new found knowledge and make the right choice", as you said so yourself.

Share this post


Link to post
Share on other sites
c39687

Just keep trolling, just keep trolling.. trolling.. trolling. Please learn to communicate with others well before leaving youtube comments.

 

Now go, "take your new found knowledge and make the right choice", as you said so yourself.

look don't take it personal, im not, but just read opening post and tell me it isnt ridiculous.

 

 

 

 

Well due to complications I can't use elseifs because its plagiarism. I did some research on case statements but it doesn't seam to like it.

 

 

 

Anyways I had a good laugh, you coming out of left field with insider info to defend that ridiculous comment was pretty funny. Weird thread I must say xD

Edited by c39687

Share this post


Link to post
Share on other sites
haws1290
mod.tick() if (blah blah) then   part = 1 elseif part = 1 then  part = 2 elseif part = 2 thenend

That is what I mean about changing between parts.

 

But instead as he didn't like me using it as he used it and HE told me to use a switch statement. Also, no im not mad, I believe you are a mouthy sh*te and have nothing else to do but troll.

 

P.S. The only thing you have taught me is how to troll. :sui:

Edited by haws1290

Share this post


Link to post
Share on other sites
c39687
mod.tick() if (blah blah) then   part = 1 elseif part = 1 then elseif part = 2 thenend

That is what I mean about changing between parts.

 

But instead as he didn't like me using it as he used it and HE told me to use a switch statement. Also, no im not mad, I believe you are a mouthy sh*te and have nothing else to do but troll.

 

P.S. The only thing you have taught me is how to troll. :sui:

 

plagiarism means you took someone's idea, in this case programming logic. You said your mod was deleted for this. You can't just go to the code now and change how the cpu makes a comparison in one part of the code. The logic and idea belong to the original author. If you had credited them then you wouldn't have to edit the else ifs (which would be a poor way to hide your plagiarism) and your mod would not have been deleted. Do you understand?

 

PS: I guess CAPS LOCKS seems scary and aggressive and maybe you thought I was raging angry... it was more to drive the point home. It was my way of letting you know this statement im making is important. Sorry to have upset you. Do you understand?

Edited by c39687

Share this post


Link to post
Share on other sites
haws1290

But here is what you don't understand. So because he has the idea of making a jewelry store heist I can't do it? I didn't know about switch statements so how could otherwise if I didn't know. Now I do so I will attempt to fix this myself as you are a completely troll.

 

P.S. I used CAPSLOCK because you can't open your f*cking eyes and read. I didn't copy any of his code because as you said I used the same logic is him as I didn't know otherwise.

Edited by haws1290

Share this post


Link to post
Share on other sites
c39687

But here is what you don't understand. So because he has the idea of making a jewelry store heist I can't do it? I didn't know about switch statements so how could otherwise if I didn't know. Now I do so I will attempt to fix this myself as you are a completely troll.

 

P.S. I used CAPSLOCK because you can't open your f*cking read. Idiot.

you can make another jewlery store heist but if the difference between his mod and yours is a switch and an else if then it must mean you copied his. It doesn't take Sherlock Holmes to see that ;)

 

It looks like your master plan to copy someone else's jewlery heist has been foiled xD

Share this post


Link to post
Share on other sites
haws1290

So I can't use the natives that he uses? He hasn't even made a jewelry store heist.

Edited by haws1290

Share this post


Link to post
Share on other sites
c39687

So I can't use the natives that he uses?

no of course you can but if the mod is the same thing as his then you gotta credit. that is all im saying... just changing some technical stuff the cpu does but essentially the mod is going to be the same is not enough to justify it as your own. Nothing personal, I probably shouldn't have assumed you were willingly intending to steal and use caps like i did, my bad, but what you are doing is technically copying his mod so you have to credit it as the original authors. You can make one but it needs to be different. You can use the same natives but make it different somehow. And even if you start with his code as a base and edit it from there then you still need to credit. Unless you write it from a blank template, you need to give credit for other's logic.

Edited by c39687

Share this post


Link to post
Share on other sites
haws1290

 

So I can't use the natives that he uses?

no of course you can but if the mod is the same thing as his then you gotta credit. that is all im saying... just changing some technical stuff the cpu does but essentially the mod is going to be the same is not enough to justify it as your own. Nothing personal, I probably shouldn't have assumed you were intending to steal and use caps like i did, my bad, but what you are doing is technically copying his mod so you have to credit it as the original authors. You can make one but it needs to be different. You can use the same natives but make it different somehow. And even if you start with his code as a base and edit it from there then you still need to credit. Unless you write it from a blank template, you need to give credit for other's logic.

 

He hasn't made a jewelry store heist so how can it be the same, I rewrote the code for the heist with a switch statement that doesn't work when it should according to lua wiki.

Share this post


Link to post
Share on other sites
c39687

 

 

So I can't use the natives that he uses?

no of course you can but if the mod is the same thing as his then you gotta credit. that is all im saying... just changing some technical stuff the cpu does but essentially the mod is going to be the same is not enough to justify it as your own. Nothing personal, I probably shouldn't have assumed you were intending to steal and use caps like i did, my bad, but what you are doing is technically copying his mod so you have to credit it as the original authors. You can make one but it needs to be different. You can use the same natives but make it different somehow. And even if you start with his code as a base and edit it from there then you still need to credit. Unless you write it from a blank template, you need to give credit for other's logic.

 

He hasn't made a jewelry store heist so how can it be the same, I rewrote the code for the heist with a switch statement that doesn't work when it should according to lua wiki.

 

well check your opening post and how you word it then, you clearly stated to avoid plagiarism issues you were editing a comparison

Edited by c39687

Share this post


Link to post
Share on other sites
haws1290

He was saying I was copying because I was using the way he used to go between different parts like I said above as I dont know how to do otherwise.

Share this post


Link to post
Share on other sites
c39687

He was saying I was copying because I was using the way he used to go between different parts like I said above as I dont know how to do otherwise.

 

so what you are telling me is you are being accused of plagiarism because he has else ifs and you have else ifs too... that makes no sense like i said in my first post

 

everybody can use else if whenever they want, just dont copy someone's mod. If you arent copying the mod then i dont see the problem. Keep the else if it is the best way to check your bools and you only want one of the true results to run your code

Edited by c39687

Share this post


Link to post
Share on other sites
Trifecta

sdada.jpg

 

 

This is just a message that I sent to Haws in our conversation.

 

I know how I code because sometimes I'm not efficient. I know for a fact that the structure, variable names, arrays, coordinates etc that I used, he used and he just renamed most of them. You can take a look for yourself.

 

And it wasn't even me that realized this. Two guys messaged me saying "This guy stole your script".

 

I let the admins be the judge of that and they took a decision.

 

P.S http://lua-users.org/wiki/SwitchStatement

Edited by Trifecta

Share this post


Link to post
Share on other sites
haws1290

Sorry for the misunderstand Trifecta, I didn't copy your script though. I know it does pretty much look exactly the same because to be honest it is but if I didn't do it like that then I couldn't get it to work as I have no idea of switch statements which I do now so I will try and make it work with a switch statement. But for some reason it doesn't work still I can't understand why it wants me to close the array containing the sections short.

 

1730916222a7a6b6e4f95b7e0fa38164.png

heistP = {[1] = start()[2] = loadBlips()[3] = jewels()[4] = escapeC()[5] = dropoff()}
Edited by haws1290

Share this post


Link to post
Share on other sites
Trifecta

Download a LUA IDE and test it there first, rather than ingame.

 

Learn the basics before doing a mod.

 

And you have an extra or missing "}" somewhere.

Share this post


Link to post
Share on other sites
haws1290

I used to code Lua for MTA if you know what that is. Also, I have looked for missing and extra "}" and unable to find any so I do not understand why this error is being returned. Its saying I need a } to close { at 412 and Im pretty sure unless my eye have gone funny I can see the } to close it at line 418

Edited by haws1290

Share this post


Link to post
Share on other sites
Trifecta
heistPart = {	[1] = function(x) doThis end,	[2] = function(x) doThat end,}

This is how it should be.

Share this post


Link to post
Share on other sites
haws1290
heistPart = {	[1] = function(x) doThis end,	[2] = function(x) doThat end,}

This is how it should be.

 

Done that already :( didn't work asking me to put in a ( next to start when there is a bracket next to start.

 

P.S. Nevermind I left start in the function part that why it wasn't working aha

Edited by haws1290

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.