This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
31
Third Party / Re: IndieMendable
« on: July 12, 2016, 11:43:00 am »
New languages added! Arabic, Dutch, English, German, French, Indonesian, Italian, Polish and Russian. Translators needed! Machine translation will never match up against your translation skills! ![Smiley :)](https://enigma-dev.org/forums/Smileys/somethingawful/smiley.gif)
More information for translating here: http://gamemaker.mooo.com/blog/?p=97
Revised languages up 'till now: English, Dutch, Indonesian, German and Italian only partially, please help.
![Smiley :)](https://enigma-dev.org/forums/Smileys/somethingawful/smiley.gif)
More information for translating here: http://gamemaker.mooo.com/blog/?p=97
Revised languages up 'till now: English, Dutch, Indonesian, German and Italian only partially, please help.
![Smiley :)](https://enigma-dev.org/forums/Smileys/somethingawful/smiley.gif)
32
Third Party / Re: IndieMendable
« on: July 11, 2016, 07:37:35 am »
I think the page or one of the images was still loading then, but I changed it to add the keyboard event before the images are loaded now.
33
Third Party / Re: IndieMendable
« on: July 11, 2016, 07:22:11 am »The search box doesn't work with snow on.That's strange. It works for me with snow turned on, even though it was actually a feature I made for last christmas.
![Cheesy :D](https://enigma-dev.org/forums/Smileys/somethingawful/cheesy.gif)
What browser are you using, I tested it in Chrome and Firefox.
34
Third Party / Re: IndieMendable
« on: July 11, 2016, 04:31:54 am »
I just translated major sections of the website to Dutch! Any translators out there willing to help with other languages? I'm using gettext/Poedit format for translations.
Dutch version
Check out http://gamemaker.mooo.com/locale/nl_NL.utf8/LC_MESSAGES/messages.po for example.
Dutch version
Check out http://gamemaker.mooo.com/locale/nl_NL.utf8/LC_MESSAGES/messages.po for example.
35
Programming Help / Re: First time try to bring Enigma/LaterGM to work: code refactoring & GEX extension
« on: July 11, 2016, 04:22:42 am »
What worked for me is saving the game as .egm format (also choose EGM on the right pane of the save dialog) and then rename the .egm extension to .zip. Then you can find/replace in all plain text files using Notepad++.
![Smiley :)](https://enigma-dev.org/forums/Smileys/somethingawful/smiley.gif)
36
Issues Help Desk / Re: Lots of compile errors
« on: July 01, 2016, 08:32:19 am »
Could someone help me with my last post? ![Huh? ???](https://enigma-dev.org/forums/Smileys/somethingawful/huh.gif)
EDIT: I solved this problem, but now the problem is in this script:
This is the script I use to detect an instance of data:
![Huh? ???](https://enigma-dev.org/forums/Smileys/somethingawful/huh.gif)
EDIT: I solved this problem, but now the problem is in this script:
Code: [Select]
/* data_copy_recursive(data)
* Copy a data instance and all its child nodes.
*/
var data,copy,i,j;
data=argument0
with(data)
{
copy=data_create()
copy.length=length
j=0
for(i=0;i<length;i+=1)
{
if string_char_at(name[i],1)="<"&&string_char_at(name[i],string_length(name[i]))=">"
continue
copy.name[j]=name[i]
if data_exists(value[i])
{
if name[i]="<hyperlink>"
copy.value[j]=data_copy(value[i])
else
copy.value[j]=data_copy_recursive(value[i])
}
else
copy.value[j]=value[i]
j+=1
}
copy.length=j
return copy;
}
return noone;
This is the script I use to detect an instance of data:
Code: [Select]
/* data_exists(data)
* Check whether or not a data instance exists.
*/
var data;
data=argument0
if is_real(data) if data>=100001 if instance_exists(data) if data.object_index=obj_data
return 1;
return 0;
37
Finished Games / 2D Pathtracing - Mirrors and lights
« on: June 24, 2016, 09:03:42 am »2D Pathtracing
This program casts light into a grid of colored mirrors. ![Cheesy :D](https://enigma-dev.org/forums/Smileys/somethingawful/cheesy.gif)
Download link: http://gamemaker.mooo.com/games/229638-2d-pathtracing
![](http://gamemaker.mooo.com/img/game/625/323592/original/screenshot270.png)
![](http://gamemaker.mooo.com/img/game/126/816863/original/screenshot123.png)
![](http://gamemaker.mooo.com/img/game/519/524312/original/screenshot124.png)
![](http://gamemaker.mooo.com/img/game/519/953455/original/screenshot269.png)
38
Tips, Tutorials, Examples / [Script] Expression evaluation
« on: June 21, 2016, 07:21:35 am »
Here's a simple script I wrote to evaluate any infix expression (e.g. 10+(1+3)*3*4^2):
You can choose to either return the resulting value from the stack, or return the resulting postfix from the infix expression. For example 10+(1+3)*3*4^2 becomes 10 1 3 + 3 * 4 * +.
Code: [Select]
/* infix_evaluate(infix,ret_fromstack,constants/scripts)
* Evalute infix expression.
*/
var str,ret_fromstack,i,j,k,l,arg,d,len,newstr,newstr2,op,push,do_push;
str=argument0
push=ds_queue_create()
do_push=0
if argument3=0
{
pcount=1+string_count('^',str)+2*(string_count('*',str)+string_count('/',str))+3*(string_count('+',str)+string_count('-',str))
str=string_repeat('(',pcount)+string_replace_all(string_replace_all(string_replace_all(string_replace_all(string_replace_all(string_replace_all(string_replace_all(str,'(','((((('),')',')))))'),'^',')^('),'*','))*(('),'/','))/(('),'+',')))+((('),'-',')))-(((')+string_repeat(')',pcount)
argument3=50
argument4=ds_stack_create()
argument5=ds_queue_create()
global.ret_stack=argument4
global.ret_stack_exec=argument5
ret_fromstack=argument1
}
else
ret_fromstack=0
if string_char_at(str,1)!="("
{
//show_message('Pushed on stack: '+str)
if ds_map_exists(argument2,str)
ds_stack_push(argument4,ds_map_find_value(argument2,str))
else if ds_map_exists(argument2,'scr_'+str)
{
//show_message('scr_'+str+'='+string(ds_map_find_value(argument2,'scr_'+str)))
ds_queue_enqueue(argument5,ds_map_find_value(argument2,'scr_'+str))
ds_stack_push(argument4,ds_map_find_value(argument2,'scr_'+str))
}
else
{
//show_message(str)
if string_length(str)=string_length(string_digits(str))+string_count('-',str)+string_count('.',str)
ds_stack_push(argument4,real(str))
else
ds_stack_push(argument4,0)
}
return str;
}
if argument3=1
return "";
newstr=""
newstr2=""
i=1
j=1
for(k=0;k<10;k+=1)
{
if string_char_at(str,i)="("
{
i+=1
j=i
d=1
len=string_length(str)
while(d&&i<=len)
{
char=string_char_at(str,i)
if char="("
d+=1
if char=")"
d-=1
i+=1
}
}
//else if k=0
// ds_stack_push(argument4,real(string_copy(str,j,i-1-j)))
op[k]=string_char_at(str,i)
//if k=0
// show_message('Operator: '+op[k])
//show_message(string_copy(str,j,i-1-j))
newstr+=infix_evaluate(string_copy(str,j,i-1-j),argument1,argument2,argument3-1,argument4,argument5)+" "
if string_pos(op[k],'^*/+-([]')
{
newstr2+=" "+op[k]
//show_message('Operator correct: '+op[k])
//if op[k]='('
// i+=4
do_push=1
i+=1
}
else
break
}
k_max=k-1
for(k=k_max;k>=0;k-=1)
{
if do_push
{
//exec='return '+string(ds_stack_pop(argument4))+op[0]+string(ds_stack_pop(argument4))
//ds_queue_enqueue(push,execute_string(exec)
//show_message(exec)
b=ds_stack_pop(argument4)
a=ds_stack_pop(argument4)
if op[k]='^'
ds_queue_enqueue(push,power(a,b))
else if op[k]='*'
ds_queue_enqueue(push,a*b)
else if op[k]='/'
{
if b=0
ds_queue_enqueue(push,a)
else
ds_queue_enqueue(push,a/b)
}
else if op[k]='+'
ds_queue_enqueue(push,a+b)
else if op[k]='-'
ds_queue_enqueue(push,a-b)
else if op[k]='['
{
//ds_queue_enqueue(argument5,a)
ds_queue_enqueue(argument5,b)
//show_message(string(a)+'~'+string(b))
do_push=0
}
else if op[k]=']'
{
function=ds_queue_dequeue(argument5)
for(l=0;l<16;l+=1)
arg[l]=0
l=0
while(!ds_queue_empty(argument5))
{
arg[l]=ds_queue_dequeue(argument5)
l+=1
}
//show_message(string(function)+"("+string(arg[0])+")")
ds_queue_enqueue(push,script_execute(function,arg[0]))
//show_message('function: '+string(function)+', result: '+string(push)) //(sin)~(1)`(0)
}
else if op[k]=','
{
ds_queue_enqueue(argument5,b)
do_push=0
}
//show_message('Pushed operation '+string(a)+' '+op[k]+' '+string(b)+' result: '+string(push))
if do_push while(!ds_queue_empty(push))
ds_stack_push(argument4,ds_queue_dequeue(push))
}
}
if ret_fromstack
return ds_stack_pop(argument4);
while(string_count(' ',newstr))
newstr=string_replace_all(newstr,' ',' ')
return newstr+newstr2;
You can choose to either return the resulting value from the stack, or return the resulting postfix from the infix expression. For example 10+(1+3)*3*4^2 becomes 10 1 3 + 3 * 4 * +.
39
Issues Help Desk / Re: Lots of compile errors
« on: June 20, 2016, 11:20:50 am »
Yes the error looks like that. I'm not coming much further without knowing what variable is causing the problem.
The error is probably caused by something in my JSON script:
If I press Ignore 4 times, the script ends. Maybe you could do something with that?
The error is probably caused by something in my JSON script:
Code: [Select]
/* data_add_from_json(data,jsonstr)
* Add data from JSON.
*/
var data,jsonstr,jsonlen,level,_char,i,str,endchar,control,searchname,_str;
data=argument[0]
jsonstr=argument[1]
with(data)
{
jsonlen=string_length(jsonstr)
level=1
array=(string_char_at(jsonstr,1)="[")
searchname=!array
i=1
while(i<=string_length(jsonstr))
{
_char=string_char_at(jsonstr,i)
//show_message(searchname*"Searching name..."+"#"+string_copy(jsonstr,i-7,7))
if _char=","
{
if !array
searchname=1
i+=1
}
else if string_pos(_char,"-1234567890.")
{
str=_char
i+=1
_char=string_char_at(jsonstr,i)
while(string_pos(_char,"1234567890."))
{
str+=_char
i+=1
_char=string_char_at(jsonstr,i)
}
value[length]=real(str)
length+=1
}
else if string_pos(_char,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_1234567890$")
{
str=""
while(string_pos(_char,"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_1234567890$"))
{
str+=_char
i+=1
_char=string_char_at(jsonstr,i)
}
if str="true"
str=1
else if str="false"
str=0
else if str="ord"
{
if string_char_at(jsonstr,i+1)="("
{
i+=2
endchar=string_char_at(jsonstr,i)
i+=1
control=0
_char=string_char_at(jsonstr,i)
while(_char!=endchar&&i<=string_length(jsonstr))
{
if _char="\"
control=1
else
{
if control
{
if _char="r"
str+=chr(13)
else if _char="n"
str+=chr(10)
else if _char="t"
str+=chr(9)
else if _char="\"
str+="\"
else if _char='"'
str+='"'
else
str+="\"+_char
control=0
}
else
str+=_char
}
i+=2
_char=string_char_at(jsonstr,i)
}
i+=1
_char=string_char_at(jsonstr,i)
str=ord(str)
}
}
else if string_copy(str,1,3)="vk_"
{
if str="vk_control"
str=vk_control
else if str="vk_alt"
str=vk_alt
else if str="vk_shift"
str=vk_shift
else if str="vk_rcontrol"
str=vk_rcontrol
else if str="vk_ralt"
str=vk_ralt
else if str="vk_rshift"
str=vk_rshift
else if str="vk_lwin"
str=vk_lwin
else if str="vk_rwin"
str=vk_rwin
else if str="vk_space"
str=vk_space
}
if !searchname
{
value[length]=str
length+=1
}
else
name[length]=str
searchname=0
}
else if _char='"'||_char="'"
{
endchar=_char
i+=1
_char=string_char_at(jsonstr,i)
str=""
control=0
if endchar='"' while((_char!=endchar||control)&&i!=jsonlen)
{
if _char="\"
control=1
else
{
if control
{
if _char="r"
str+=chr(13)
else if _char="n"
str+=chr(10)
else if _char="t"
str+=chr(9)
else if _char="\"
str+="\"
else if _char='"'
str+='"'
else
str+="\"+_char
control=0
}
else
str+=_char
}
i+=1
_char=string_char_at(jsonstr,i)
}
else while(_char!=endchar&&i!=jsonlen)
{
str+=_char
i+=1
_char=string_char_at(jsonstr,i)
}
if !searchname
{
value[length]=str
length+=1
}
else
name[length]=str
searchname=0
i+=1
_char=string_char_at(jsonstr,i)
}
else if _char="{"&&i!=1
{
i+=1
_char=string_char_at(jsonstr,i)
value[length]=data_from_json(string_copy(jsonstr,i,string_length(jsonstr)-i+1),id)
length+=1
i+=skip
}
else if _char="}"||_char="]"
{
if argument[2]!=0
argument[2].skip=i
break
}
else if _char="["&&i!=1
{
value[length]=data_from_json(string_copy(jsonstr,i,string_length(jsonstr)-i+1),id)
length+=1
i+=skip
}
else
i+=1
}
return id;
}
If I press Ignore 4 times, the script ends. Maybe you could do something with that?
40
Third Party / Re: IndieMendable
« on: June 18, 2016, 10:42:25 am »
Added Markdown functionality to profile description, and also added link to this site in the links bar at the top of the site.
![Smiley :)](https://enigma-dev.org/forums/Smileys/somethingawful/smiley.gif)
41
Sound and Music / Re: 11 songs
« on: June 17, 2016, 01:01:48 pm »
New track: Song 01 [REMASTERED].
![Cheesy :D](https://enigma-dev.org/forums/Smileys/somethingawful/cheesy.gif)
42
Issues Help Desk / Re: Lots of compile errors
« on: June 17, 2016, 11:46:17 am »
I mean, I don't see any popup window or so. The game doesn't even reach a draw event, it shows the error in the create event.
43
Issues Help Desk / Re: Lots of compile errors
« on: June 16, 2016, 10:03:15 am »Running in debug mode should tell you the variables name in a popup window.I don't see anything. I even made a test program with an nonexistent variable, but it doesn't give any error!
![Huh? ???](https://enigma-dev.org/forums/Smileys/somethingawful/huh.gif)
44
Issues Help Desk / Re: Lots of compile errors
« on: June 16, 2016, 05:13:55 am »
Now it says trying to access uninitialized variable. Where can I see what variable it's talking about?
45
Issues Help Desk / Re: Lots of compile errors
« on: June 16, 2016, 03:36:36 am »
Installed newer DirectX 9.0, it's coming further now. Now I need to change the code a lot since it uses argument_count.
![Grin ;D](https://enigma-dev.org/forums/Smileys/somethingawful/grin.gif)