Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-07-2009, 11:44 PM
DarknessShadow DarknessShadow is offline
Registered User
Join Date: Jun 2007
Location: Northern Ireland
Posts: 78
DarknessShadow is on a distinguished road
Send a message via AIM to DarknessShadow Send a message via MSN to DarknessShadow
MASM/Vb6 to GS2

I'm very experienced in both MASM and VB6, I'd like to know if there is any similarities between the MASM+VB6 and GS2,Syntax wise?
Will it be a easy transfer over,easy to learn?
Thanks!
__________________
Reply With Quote
  #2  
Old 12-07-2009, 11:51 PM
WhiteDragon WhiteDragon is offline
Banned
Join Date: Feb 2007
Posts: 1,002
WhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to beholdWhiteDragon is a splendid one to behold
I don't know where in the world you picked up VB6, as it's not a good language, in my opinion.

In terms of syntax, VB6 is not terribly close to the C-style GS2. However, a number of the concepts are the same.

Saying "easy" would probably be inaccurate; learning GS2 will require work, like learning anything else.

In the end though, I don't believe GS2 is hard to figure out, even without prior programming experience. So, it shouldn't be terribly hard for you.
Reply With Quote
  #3  
Old 12-08-2009, 12:24 AM
DarknessShadow DarknessShadow is offline
Registered User
Join Date: Jun 2007
Location: Northern Ireland
Posts: 78
DarknessShadow is on a distinguished road
Send a message via AIM to DarknessShadow Send a message via MSN to DarknessShadow
Quote:
Originally Posted by WhiteDragon View Post
I don't know where in the world you picked up VB6, as it's not a good language, in my opinion.

In terms of syntax, VB6 is not terribly close to the C-style GS2. However, a number of the concepts are the same.

Saying "easy" would probably be inaccurate; learning GS2 will require work, like learning anything else.

In the end though, I don't believe GS2 is hard to figure out, even without prior programming experience. So, it shouldn't be terribly hard for you.
VB6 is a decent language with the right resources,it all depends on what your are trying to do.
The only thing i find pathetic about vb6 is Thread support,it crashes on point if you even try to create a thread. Although i found vb6 useful for DLL hooking and more along those lines. I didn't think MASM would have anywhere near the same syntax,since well nothing really has near the same syntax as ASM.
Thanks for your info,I'm reading on the wiki right now
__________________
Reply With Quote
  #4  
Old 12-08-2009, 12:37 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by DarknessShadow View Post
VB6 is a decent language with the right resources,it all depends on what your are trying to do.
Visual Basic has a very lazy "verbose" syntax; you make very heavy use of keywords to instruct it to do something. GScript is less like that, since it borrows it's syntax from ECMAScript or even C/C++. There is more notation to learn. GScript is a lot more structured also, it takes a more object-oriented approach to programming and attempts to modularise things into weapons, classes, database NPCs, etc so that to someone new coming along, they make more sense and have relatively specific purposes.

I guess there are similarities; VB will have functions and variables just the same as GScript does, because these are quite fundamental to most scripting languages, but you will find that the accepted ways of doing things are quite different.
__________________
Skyld
Reply With Quote
  #5  
Old 12-08-2009, 12:40 AM
DarknessShadow DarknessShadow is offline
Registered User
Join Date: Jun 2007
Location: Northern Ireland
Posts: 78
DarknessShadow is on a distinguished road
Send a message via AIM to DarknessShadow Send a message via MSN to DarknessShadow
Quote:
Originally Posted by Skyld View Post
Visual Basic has a very lazy "verbose" syntax; you make very heavy use of keywords to instruct it to do something. GScript is less like that, since it borrows it's syntax from ECMAScript or even C/C++. There is more notation to learn. GScript is a lot more structured also, it takes a more object-oriented approach to programming and attempts to modularise things into weapons, classes, database NPCs, etc so that to someone new coming along, they make more sense and have relatively specific purposes.

I guess there are similarities; VB will have functions and variables just the same as GScript does, because these are quite fundamental to most scripting languages, but you will find that the accepted ways of doing things are quite different.
I do know a little C++/PHP syntax, from the few snippets I've read it seems to make sense in my head.
Is there anywhere other than the wiki to learn? Or is that where everything goes(Apart from the forums too :P )
__________________
Reply With Quote
  #6  
Old 12-08-2009, 12:04 PM
Samposse Samposse is offline
Chopa Shopa !
Samposse's Avatar
Join Date: Nov 2008
Location: Norway
Posts: 87
Samposse is an unknown quantity at this point
Send a message via AIM to Samposse Send a message via MSN to Samposse
i am learning scripting to but i only can simple stuff as
PHP Code:
//#CLIENTSIDE 

function onPlayerChats(){
return;
player.chat "im Muted and cant talk !"
... i need a good tutorial ...

and i know some basic Var stuff as

PHP Code:
funcion onCreated() {
var
.1 "Hello World";
echo var
.1
__________________
Delitto :3

A
SERVER
UNDER
CONSTRUCTION !

feel free to ask me about delitto
Reply With Quote
  #7  
Old 12-08-2009, 12:06 PM
Samposse Samposse is offline
Chopa Shopa !
Samposse's Avatar
Join Date: Nov 2008
Location: Norway
Posts: 87
Samposse is an unknown quantity at this point
Send a message via AIM to Samposse Send a message via MSN to Samposse
and i even dont know if those "scripts" works -.-

Quote:
i am learning scripting to but i only can simple stuff as

PHP Code:
//#CLIENTSIDE

function onPlayerChats(){
return;
player.chat = "im Muted and cant talk !";

... i need a good tutorial ...

and i know some basic Var stuff as


PHP Code:
funcion onCreated() {
var.1 = "Hello World";
echo var.1;
__________________
Delitto :3

A
SERVER
UNDER
CONSTRUCTION !

feel free to ask me about delitto
Reply With Quote
  #8  
Old 12-08-2009, 12:10 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Samposse View Post

PHP Code:
funcion onCreated() {
var
.1 "Hello World";
echo var
.1
It's a mix between languages there... this would work better

PHP Code:
function onCreated()
{
  
this.var1 "Hello World!";
  echo(
this.var1);

GS2 (the current language) requires the use of ( ) to designate a function. The reason that may work is because gs1 used the 'function var' syntax without the use of parenthesis. Also, while var.1 would technically work, it's a strange way of doing it within gscript

As for the other script, placing a, "return; straight after the function is caused would stop the execution right there as returns stop what the function is doing and returns a result to the original caller (in this case, 0 since no value was supplied. I am not sure what you were trying to achieve with that return
Reply With Quote
Reply


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 +2. The time now is 11:01 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.