Posted 17 November 2012 - 02:12 AM
Hi,
I'm doing a turtle program for minning but i have a trouble with the gsub function…
I want to remove a string in another sting so here is my problem (line 271) :
where posToBase, hauteur and largeur are int, posDesMinerai is a string like that "0,1,5;1,2,-1;"
The error is :
minning:271: bad argument :
string/function/table expected
the posDesMinerai var may had already be cut by a gsub.
So please help me :)/>/>
PS : I'm frensh so in the code there is some words in french and oters in English ^^
I'm doing a turtle program for minning but i have a trouble with the gsub function…
I want to remove a string in another sting so here is my problem (line 271) :
posDesMinerai = posDesMinerai:gsub(posToBase..","..hauteur..","..largeur..";")
where posToBase, hauteur and largeur are int, posDesMinerai is a string like that "0,1,5;1,2,-1;"
The error is :
minning:271: bad argument :
string/function/table expected
the posDesMinerai var may had already be cut by a gsub.
So please help me :)/>/>
PS : I'm frensh so in the code there is some words in french and oters in English ^^